|
|
@@ -74,6 +74,11 @@ void level::add_bullet(bullet b) {
|
|
|
|
|
|
void level::update(float delta) {
|
|
|
update_waves(delta);
|
|
|
+ update_object(delta);
|
|
|
+ check_collisions();
|
|
|
+}
|
|
|
+
|
|
|
+void level::update_object(float delta) {
|
|
|
player_->update(delta);
|
|
|
for (auto & a : actors_) {
|
|
|
a->update(delta);
|
|
|
@@ -81,7 +86,10 @@ void level::update(float delta) {
|
|
|
for (auto & b : bullets_) {
|
|
|
b->update(delta);
|
|
|
}
|
|
|
- check_collisions();
|
|
|
+}
|
|
|
+
|
|
|
+void level::check_collisions() {
|
|
|
+ engine::scene::check_collisions();
|
|
|
// TODO: This is a bad hack until I can properly disassociate collision info
|
|
|
for (auto & b : bullets_) {
|
|
|
if (math::intersects(player_->render_info().points,
|