Pacman Torben Petré
Loading...
Searching...
No Matches
GameOverState.h
Go to the documentation of this file.
1#ifndef GAMEOVERSTATE_H
2#define GAMEOVERSTATE_H
3
4#include <SFML/Graphics/Text.hpp>
5
6#include "StateManager.h"
7
8
9class GameOverState 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 score;
43
44 sf::Text cta;
45 bool renderCta = true;
46 double elapsedTime;
47};
48
49
50
51#endif //GAMEOVERSTATE_H
GameOverState(StateManager &context)
This State determines the GameOver menu when the Player has lost all their lives.
Definition GameOverState.cpp:7
void handleInput(const sf::Event::KeyEvent &keyPressed) override
Will return to the Menu when a specific key is pressed.
Definition GameOverState.cpp:32
void resized() override
Will resize the contents of the GameOver state.
Definition GameOverState.cpp:43
void render() override
Renders the GameOver State.
Definition GameOverState.cpp:74
void update(double dt) override
Update the GameOverState, is used for UI animations.
Definition GameOverState.cpp:62
State(StateManager &ctx)
Creates the base State object.
Definition StateManager.cpp:4
StateManager & context
Definition StateManager.h:54
Definition StateManager.h:96