Pacman Torben Petré
Loading...
Searching...
No Matches
PausedState.h
Go to the documentation of this file.
1#ifndef PAUSEDSTATE_H
2#define PAUSEDSTATE_H
3
4#include <SFML/Graphics/Text.hpp>
5
6#include "StateManager.h"
7
8
9class PausedState final : public State {
10public:
17
22 void handleInput(const sf::Event::KeyEvent &keyPressed) override;
23
27 void resized() override;
28
33 void update(double dt) override;
34
38 void render() override;
39
40private:
41 sf::Text title;
42 sf::Text info;
43 sf::Text cta;
44
45 bool animationRender = true;
46 double elapsedTime;
47
48};
49
50
51
52#endif //PAUSEDSTATE_H
PausedState(StateManager &context)
This State determines the Paused menu when pausing the actual Pacman game.
Definition PausedState.cpp:8
void render() override
Renders the PausedState.
Definition PausedState.cpp:75
void update(double dt) override
This is used for UI animations.
Definition PausedState.cpp:64
void handleInput(const sf::Event::KeyEvent &keyPressed) override
Goes back to the LevelState when specific keys are pressed.
Definition PausedState.cpp:25
void resized() override
Will resize the contents of the Paused state.
Definition PausedState.cpp:46
State(StateManager &ctx)
Creates the base State object.
Definition StateManager.cpp:4
StateManager & context
Definition StateManager.h:54
Definition StateManager.h:96