123456789101112131415161718192021222324252627282930313233343536373839 |
- #pragma once
- #include <SFML/Graphics.hpp>
- #include <tmxlite/Map.hpp>
- #include "SFMLOrthogonalLayer.hpp"
- #include "State.hpp"
- #include "Player.hpp"
- #include "Spectre.hpp"
- #define LAYER_COUNT 6
- class StateIngame: public State {
- public:
- StateIngame();
- virtual ~StateIngame();
- void reset();
- void onEvent(sf::Event event) final;
- void onUpdate(float dt) final;
- void onRender() final;
- State* next() const final;
- private:
- bool m_paused { false };
- sf::Clock m_global_clock;
- Player m_player;
- sf::Sound m_music;
- sf::Sprite m_background;
- sf::Sprite m_vignette;
- tmx::Map m_map;
- tmx::Map m_map2;
- std::array<MapLayer, LAYER_COUNT * 2> m_layer;
- std::vector<Spectre*> m_spectres;
- std::vector<Spectre::Settings> m_spectre_list;
- sf::Sound m_snd;
- sf::Music m_wind;
- sf::Music m_brown;
- };
|