StateSplash.hpp 492 B

12345678910111213141516171819202122232425
  1. #pragma once
  2. #include <SFML/Graphics.hpp>
  3. #include "State.hpp"
  4. #include "AnimatedSprite.hpp"
  5. class StateSplash: public State {
  6. public:
  7. enum SplashType {
  8. MAIN, INSTRUCTION, VICTORY
  9. };
  10. public:
  11. StateSplash() = delete;
  12. StateSplash(SplashType type);
  13. virtual ~StateSplash();
  14. void onEvent(sf::Event event) final;
  15. void onUpdate(float dt) final;
  16. void onRender() final;
  17. State* next() const final;
  18. private:
  19. void switchTo(SplashType type);
  20. AnimatedSprite m_sprite;
  21. SplashType m_type;
  22. };