#define BLANK_AI_SPAWNER_HPP_
#include "../app/IntervalTimer.hpp"
-#include "../model/CompositeModel.hpp"
-#include "../model/EntityModel.hpp"
-#include "../rand/GaloisLFSR.hpp"
#include <vector>
#include <glm/glm.hpp>
class Controller;
class Entity;
+class GaloisLFSR;
+class Model;
+class ModelRegistry;
class World;
class Spawner {
public:
- Spawner(World &, std::uint64_t seed);
+ Spawner(World &, ModelRegistry &, GaloisLFSR &);
~Spawner();
+ void LimitModels(std::size_t begin, std::size_t end);
+
void Update(int dt);
private:
void TrySpawn();
void Spawn(Entity &reference, const glm::ivec3 &, const glm::vec3 &);
+ Model &RandomModel() noexcept;
+
private:
World &world;
+ ModelRegistry ⊧
std::vector<Controller *> controllers;
- EntityModel models[3];
- CompositeModel skeletons[3];
-
- GaloisLFSR random;
+ GaloisLFSR &random;
IntervalTimer timer;
float despawn_range;
unsigned int max_entities;
int chunk_range;
+ std::size_t model_offset;
+ std::size_t model_length;
+
};
}