X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fai%2FSpawner.hpp;h=9fb3d368de0dcd2a02156006422526a54a95a53f;hb=cda510e480aba3702e95059163378822ccac8d17;hp=120db6003424a1dfa91a0e0e387a502b5733554c;hpb=c52405fad9c070e1370f852234c6eb723b52916c;p=blank.git diff --git a/src/ai/Spawner.hpp b/src/ai/Spawner.hpp index 120db60..9fb3d36 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 @@ -15,7 +18,7 @@ class World; class Spawner { public: - explicit Spawner(World &); + Spawner(World &, std::uint64_t seed); ~Spawner(); void Update(int dt); @@ -23,12 +26,17 @@ public: private: void CheckDespawn() noexcept; void TrySpawn(); - void Spawn(const glm::tvec3 &, const glm::vec3 &); + void Spawn(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;