Pacman Torben Petré
Loading...
Searching...
No Matches
VictoryState.h
Go to the documentation of this file.
1#ifndef PACMAN_VICTORYSTATE_H
2#define PACMAN_VICTORYSTATE_H
3
4#include <SFML/Graphics/Text.hpp>
5
6#include "StateManager.h"
7
8
9class VictoryState 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
43 sf::Text cta;
44 bool renderCta = true;
45 double elapsedTime;
46};
47
48
49#endif //PACMAN_VICTORYSTATE_H
State(StateManager &ctx)
Creates the base State object.
Definition StateManager.cpp:4
StateManager & context
Definition StateManager.h:54
Definition StateManager.h:96
void update(double dt) override
This is used for UI animations.
Definition VictoryState.cpp:39
void handleInput(const sf::Event::KeyEvent &keyPressed) override
Will load the next level regardless of what key was pressed.
Definition VictoryState.cpp:20
void render() override
Renders the Victory State.
Definition VictoryState.cpp:51
void resized() override
Will resize the contents of the Victory state.
Definition VictoryState.cpp:25
VictoryState(StateManager &context)
This State determines the Victory menu at the end of a single Pacman level.
Definition VictoryState.cpp:7