X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fai%2FSpawner.hpp;h=a1181d30bf96f77ec0809228f2079c7d0c7fa88f;hb=dbfcb12348b80e2582f710acb1e4ed0011889ba2;hp=127a8606dbdfbb8a2a6e491d75b632a8fb22ba99;hpb=549646ac3e5bede5e77031f773649edf8de83608;p=blank.git diff --git a/src/ai/Spawner.hpp b/src/ai/Spawner.hpp index 127a860..a1181d3 100644 --- a/src/ai/Spawner.hpp +++ b/src/ai/Spawner.hpp @@ -2,6 +2,9 @@ #define BLANK_AI_SPAWNER_HPP_ #include "../app/IntervalTimer.hpp" +#include "../model/CompositeModel.hpp" +#include "../model/EntityModel.hpp" +#include "../rand/GaloisLFSR.hpp" #include #include @@ -10,12 +13,13 @@ namespace blank { class Controller; +class Entity; class World; class Spawner { public: - explicit Spawner(World &); + Spawner(World &, std::uint64_t seed); ~Spawner(); void Update(int dt); @@ -23,12 +27,17 @@ public: private: void CheckDespawn() noexcept; void TrySpawn(); - void Spawn(const glm::ivec3 &, const glm::vec3 &); + void Spawn(Entity &reference, const glm::ivec3 &, const glm::vec3 &); private: World &world; std::vector controllers; + EntityModel models[3]; + CompositeModel skeletons[3]; + + GaloisLFSR random; + IntervalTimer timer; float despawn_range; float spawn_distance;