Core.hpp 613 B

12345678910111213141516171819202122232425262728293031323334
  1. #pragma once
  2. #include <vector>
  3. #include <SFML/Graphics.hpp>
  4. #include <SFML/Audio.hpp>
  5. #include "SFMLOrthogonalLayer.hpp"
  6. #include "Launcher.hpp"
  7. #include "IEntity.hpp"
  8. #include "State.hpp"
  9. #include "Renderer.hpp"
  10. class Core {
  11. public:
  12. Core() = delete;
  13. Core(sf::RenderWindow* window);
  14. virtual ~Core();
  15. void run();
  16. private:
  17. //void registerEntity(IEntity* entity);
  18. //void deregisterEntity(IEntity* entity);
  19. void events();
  20. void update(float dt);
  21. Renderer m_renderer;
  22. State* m_state;
  23. State* m_oldState{ nullptr };
  24. std::vector<IEntity*> m_entities;
  25. bool m_running;
  26. sf::RenderWindow* m_window;
  27. };