aboutsummaryrefslogtreecommitdiff
path: root/game/enemy/EnemyScript.cpp
diff options
context:
space:
mode:
authorWBoerenkamps <wrj.boerenkamps@student.avans.nl>2025-01-08 12:43:54 +0100
committerWBoerenkamps <wrj.boerenkamps@student.avans.nl>2025-01-08 12:43:54 +0100
commit016b36b6d340be958bb047ca5f26dd54aa658c88 (patch)
treed5ea295632b4290cf2e5ef06e1b83e40a3e0c36c /game/enemy/EnemyScript.cpp
parent9625b751757b8828b0edb0b7543c7cadfd25c119 (diff)
battlescript battle won working
Diffstat (limited to 'game/enemy/EnemyScript.cpp')
-rw-r--r--game/enemy/EnemyScript.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/game/enemy/EnemyScript.cpp b/game/enemy/EnemyScript.cpp
index 4b75846..f9b79ea 100644
--- a/game/enemy/EnemyScript.cpp
+++ b/game/enemy/EnemyScript.cpp
@@ -82,6 +82,8 @@ bool EnemyScript::on_collide(const CollisionEvent & e){
if(e.info.other.metadata.tag == "player_bullet"){
this->despawn_enemy();
}
+ BehaviorScript& enemy_script = this->get_component<BehaviorScript>();
+ enemy_script.active = false;
return false;
}
void EnemyScript::despawn_enemy(){