From 7739a80176cea889ce240d18d354c5174825b25a Mon Sep 17 00:00:00 2001 From: WBoerenkamps Date: Thu, 9 Jan 2025 14:46:30 +0100 Subject: workers during normal sequence working --- game/enemy/EnemyScript.h | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'game/enemy/EnemyScript.h') diff --git a/game/enemy/EnemyScript.h b/game/enemy/EnemyScript.h index 42ecac4..24799a5 100644 --- a/game/enemy/EnemyScript.h +++ b/game/enemy/EnemyScript.h @@ -13,19 +13,24 @@ public: EnemyScript(); void init() override; void fixed_update(crepe::duration_t dt) override; - void shoot(const crepe::vec2 & position, float angle); + void shoot(const crepe::vec2 & position); bool on_collide(const crepe::CollisionEvent & collisionData); void despawn_enemy(); bool spawn_enemy(const SpawnEnemyEvent & e); - + void create_tank(); + void create_soldier(); + void set_hit_blink(bool status); private: std::random_device rd; std::default_random_engine engine; bool alive = false; float speed = 50; - const float MIN_SPEED = 10; - const float MAX_SPEED = 130; - const float MAX_DISTANCE = 100; + int health = 2; + const float MIN_SPEED = 20; + const float MAX_SPEED = 150; + const float MAX_DISTANCE = 200; std::chrono::time_point last_fired; + std::chrono::time_point last_hit; std::chrono::duration shot_delay = std::chrono::duration(0); + std::chrono::duration blink_time = std::chrono::duration(0.1); }; -- cgit v1.2.3