Starlight.hpp 678 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #pragma once
  2. #include <SFML/Graphics.hpp>
  3. #include <SFML/Audio.hpp>
  4. #include "Player.hpp"
  5. #include "Map.hpp"
  6. #include "Menu.hpp"
  7. #include "Powerup.hpp"
  8. using namespace sf;
  9. class Starlight
  10. {
  11. public:
  12. Starlight() = delete;
  13. Starlight(RenderWindow* window, bool* keepRunning);
  14. ~Starlight();
  15. void run();
  16. private:
  17. void events();
  18. void input(float delta);
  19. void logic(float delta);
  20. void render();
  21. void toggleFrame(bool on, float delta);
  22. RenderWindow* _window;
  23. Map _map;
  24. ActualPlayer _player;
  25. std::vector<AiPlayer*> _enemy;
  26. Menu _menu;
  27. PowerupManager _powerups;
  28. RectangleShape _frame;
  29. View _view;
  30. int _returnCode;
  31. bool _running;
  32. bool* _keepRunning;
  33. };