From dc8140877c1ae638285d812035473591a1814ce7 Mon Sep 17 00:00:00 2001 From: WBoerenkamps Date: Thu, 9 Jan 2025 16:06:45 +0100 Subject: enemy death working --- game/enemy/EnemyScript.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'game/enemy/EnemyScript.h') diff --git a/game/enemy/EnemyScript.h b/game/enemy/EnemyScript.h index 2bd9742..03343f6 100644 --- a/game/enemy/EnemyScript.h +++ b/game/enemy/EnemyScript.h @@ -17,6 +17,7 @@ public: bool on_collide(const crepe::CollisionEvent & collisionData); void despawn_enemy(); bool spawn_enemy(const SpawnEnemyEvent & e); + void death(); void create_tank(); void create_soldier(); void set_hit_blink(bool status); @@ -25,6 +26,7 @@ private: std::random_device rd; std::default_random_engine engine; bool alive = false; + bool spawned = false; float speed = 50; int health = 2; const float MIN_SPEED = 20; -- cgit v1.2.3