aboutsummaryrefslogtreecommitdiff
path: root/game/enemy/EnemyScript.h
diff options
context:
space:
mode:
authorWBoerenkamps <wrj.boerenkamps@student.avans.nl>2025-01-09 16:06:45 +0100
committerWBoerenkamps <wrj.boerenkamps@student.avans.nl>2025-01-09 16:06:45 +0100
commitdc8140877c1ae638285d812035473591a1814ce7 (patch)
treeb8e2538e98a9b3d461cc54455a62095a48ddb32b /game/enemy/EnemyScript.h
parentb091cb7910fa82e9fb00abdb163d277ba574f804 (diff)
enemy death working
Diffstat (limited to 'game/enemy/EnemyScript.h')
-rw-r--r--game/enemy/EnemyScript.h2
1 files changed, 2 insertions, 0 deletions
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;