X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fai%2FSpawner.hpp;h=d0c6f97c4695cbdf9db26202c8e8b8be4bf176fb;hb=5178dd1e226d45db7ae61e3d7d6866dc4254d9ae;hp=a1181d30bf96f77ec0809228f2079c7d0c7fa88f;hpb=dbfcb12348b80e2582f710acb1e4ed0011889ba2;p=blank.git diff --git a/src/ai/Spawner.hpp b/src/ai/Spawner.hpp index a1181d3..d0c6f97 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 @@ -12,16 +10,20 @@ namespace blank { +class CompositeModel; 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 LimitSkeletons(std::size_t begin, std::size_t end); + void Update(int dt); private: @@ -29,13 +31,13 @@ private: void TrySpawn(); void Spawn(Entity &reference, const glm::ivec3 &, const glm::vec3 &); + CompositeModel &RandomSkeleton() noexcept; + private: World &world; + Skeletons &skeletons; std::vector controllers; - EntityModel models[3]; - CompositeModel skeletons[3]; - GaloisLFSR random; IntervalTimer timer; @@ -44,6 +46,9 @@ private: unsigned int max_entities; int chunk_range; + std::size_t skeletons_offset; + std::size_t skeletons_length; + }; }