diff options
author | heavydemon21 <nielsstunnebrink1@gmail.com> | 2025-01-08 14:57:09 +0100 |
---|---|---|
committer | heavydemon21 <nielsstunnebrink1@gmail.com> | 2025-01-08 14:57:09 +0100 |
commit | 714c8798dd0998ea15b1ba697962a97c586457fe (patch) | |
tree | 86d36b17a71845cd4b5d16a0e9abd11df0d55c03 /game/enemy/BattleScript.h | |
parent | fbd7c84e13381922bf327e20c1abc65337142445 (diff) | |
parent | 0de6692dcb029540f4502c5a2f1a0c6634f7b61f (diff) |
Merge remote-tracking branch 'origin/wouter/enemyAI' into niels/game
Diffstat (limited to 'game/enemy/BattleScript.h')
-rw-r--r-- | game/enemy/BattleScript.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/game/enemy/BattleScript.h b/game/enemy/BattleScript.h new file mode 100644 index 0000000..ddd0be1 --- /dev/null +++ b/game/enemy/BattleScript.h @@ -0,0 +1,24 @@ +#pragma once + +#include <crepe/api/BehaviorScript.h> +#include <crepe/api/Event.h> +#include <crepe/api/Script.h> +#include <random> +struct BattleWonEvent : public crepe::Event {}; + +struct BattleStartEvent : public crepe::Event { +public: + int num_enemies = 0; +}; +class BattleScript : public crepe::Script { +public: + BattleScript(); + void init() override; + void fixed_update(crepe::duration_t dt) override; + +private: + bool battle_active = false; + std::random_device rd; + std::default_random_engine engine; + bool create_battle(const BattleStartEvent & e); +}; |