X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fai%2FSpawner.hpp;h=c55d73c0f7f90b835b5791f69e8c9096e17cc81d;hb=ad7cf72ed47c39640d5588ba53386e090289b4d1;hp=e3e8f24feea0326322266596576cf9d0e8e770dc;hpb=79bff420037f150bd6efd2eef08bd06afafeb068;p=blank.git diff --git a/src/ai/Spawner.hpp b/src/ai/Spawner.hpp index e3e8f24..c55d73c 100644 --- a/src/ai/Spawner.hpp +++ b/src/ai/Spawner.hpp @@ -1,13 +1,16 @@ #ifndef BLANK_AI_SPAWNER_HPP_ #define BLANK_AI_SPAWNER_HPP_ -#include +#include "../app/IntervalTimer.hpp" +#include "../model/EntityModel.hpp" + +#include #include namespace blank { -class RandomWalk; +class Controller; class World; class Spawner { @@ -19,11 +22,21 @@ public: void Update(int dt); private: - void Spawn(const glm::vec3 &); + void CheckDespawn() noexcept; + void TrySpawn(); + void Spawn(const glm::ivec3 &, const glm::vec3 &); private: World &world; - std::list controllers; + std::vector controllers; + + EntityModel models[3]; + + IntervalTimer timer; + float despawn_range; + float spawn_distance; + unsigned int max_entities; + int chunk_range; };