]> git.localhorst.tv Git - blank.git/blobdiff - src/ai/Spawner.hpp
special treatment for players
[blank.git] / src / ai / Spawner.hpp
index a0da02fb0ec939b4e7a6c8e2375a82b00d83d03a..a1181d30bf96f77ec0809228f2079c7d0c7fa88f 100644 (file)
@@ -2,20 +2,24 @@
 #define BLANK_AI_SPAWNER_HPP_
 
 #include "../app/IntervalTimer.hpp"
+#include "../model/CompositeModel.hpp"
+#include "../model/EntityModel.hpp"
+#include "../rand/GaloisLFSR.hpp"
 
-#include <list>
+#include <vector>
 #include <glm/glm.hpp>
 
 
 namespace blank {
 
-class RandomWalk;
+class Controller;
+class Entity;
 class World;
 
 class Spawner {
 
 public:
-       explicit Spawner(World &);
+       Spawner(World &, std::uint64_t seed);
        ~Spawner();
 
        void Update(int dt);
@@ -23,11 +27,16 @@ public:
 private:
        void CheckDespawn() noexcept;
        void TrySpawn();
-       void Spawn(const glm::tvec3<int> &, const glm::vec3 &);
+       void Spawn(Entity &reference, const glm::ivec3 &, const glm::vec3 &);
 
 private:
        World &world;
-       std::list<RandomWalk> controllers;
+       std::vector<Controller *> controllers;
+
+       EntityModel models[3];
+       CompositeModel skeletons[3];
+
+       GaloisLFSR random;
 
        IntervalTimer timer;
        float despawn_range;