Simple C++ Game
EntityEngine.hpp
1 #pragma once
2 
3 #include <EntitySystem.hpp>
4 
5 #include <SFML/System.hpp>
6 
7 #include <vector>
8 #include <memory>
9 
14 {
15 public:
26  void add(std::shared_ptr<EntitySystem> system);
27 
38  void add(std::shared_ptr<Entity> entity);
39 
47  void update(const sf::Time deltaTime);
48 
49 private:
50  std::vector<std::shared_ptr<EntitySystem>> _systems;
51  std::map<int, std::shared_ptr<Entity>> _entities;
52 };
A engine for handling a component entity system.
Definition: EntityEngine.hpp:14
void add(std::shared_ptr< Entity > entity)
Adds an entity to the engine.
void update(const sf::Time deltaTime)
Updates all systems in the engine.
void add(std::shared_ptr< EntitySystem > system)
Adds a system to the engine.