diff options
Diffstat (limited to 'game/enemy')
-rw-r--r-- | game/enemy/BattleScript.cpp | 2 | ||||
-rw-r--r-- | game/enemy/EnemyScript.cpp | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/game/enemy/BattleScript.cpp b/game/enemy/BattleScript.cpp index dde8da1..4260c42 100644 --- a/game/enemy/BattleScript.cpp +++ b/game/enemy/BattleScript.cpp @@ -39,7 +39,7 @@ bool BattleScript::create_battle(const BattleStartEvent & e) { for (int i = 0; i < e.num_enemies; i++) { BehaviorScript & script = enemy_scripts[i]; script.active = true; - this->trigger_event<SpawnEnemyEvent>( + this->queue_event<SpawnEnemyEvent>( SpawnEnemyEvent { .speed = dist(engine), .column = i, diff --git a/game/enemy/EnemyScript.cpp b/game/enemy/EnemyScript.cpp index 8e475a8..07ed9e8 100644 --- a/game/enemy/EnemyScript.cpp +++ b/game/enemy/EnemyScript.cpp @@ -84,8 +84,7 @@ bool EnemyScript::spawn_enemy(const SpawnEnemyEvent & e) { bool EnemyScript::on_collide(const CollisionEvent & e) { if (e.info.other.metadata.tag == "player_bullet") { - //this->despawn_enemy(); - + this->despawn_enemy(); } Animator& body_animator = this->get_components<Animator>().front(); body_animator.data.col = 2; |