X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fai%2FSpawner.hpp;h=d4c0a57f2c6b345d5749c04aa81ef31a22a0b8ca;hb=43820582217f7e4b707d98f2e69d969eb77fc7c3;hp=9fb3d368de0dcd2a02156006422526a54a95a53f;hpb=41652fb3d73f12e6ae4ce7380244a75a4f5c6797;p=blank.git diff --git a/src/ai/Spawner.hpp b/src/ai/Spawner.hpp index 9fb3d36..d4c0a57 100644 --- a/src/ai/Spawner.hpp +++ b/src/ai/Spawner.hpp @@ -2,8 +2,6 @@ #define BLANK_AI_SPAWNER_HPP_ #include "../app/IntervalTimer.hpp" -#include "../model/CompositeModel.hpp" -#include "../model/EntityModel.hpp" #include "../rand/GaloisLFSR.hpp" #include @@ -13,12 +11,14 @@ namespace blank { class Controller; +class Entity; +class Skeletons; class World; class Spawner { public: - Spawner(World &, std::uint64_t seed); + Spawner(World &, Skeletons &, std::uint64_t seed); ~Spawner(); void Update(int dt); @@ -26,15 +26,13 @@ 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; + Skeletons &skeletons; std::vector controllers; - EntityModel models[3]; - CompositeModel skeletons[3]; - GaloisLFSR random; IntervalTimer timer;