![]() |
HeadBall
1.0
A game
|
Class for game over or full-time state. More...
#include <GameOver.hpp>
Public Member Functions | |
GameOver (GameDataRef data, ScoreTimeRef scoreTime) | |
Construct a new Game Over object. More... | |
void | init () |
Initialize state related data. More... | |
void | handleInput () |
Handle user input. More... | |
void | update () |
Update state data. More... | |
void | draw () |
Draw state objects. More... | |
virtual void | pause () |
Virtual function for pausing the state. More... | |
virtual void | resume () |
Virtual function for resuming the object. More... | |
virtual void | animate () |
Vitrual function for performing animations. More... | |
Private Attributes | |
GameDataRef | _data |
The shared pointer for GameData. More... | |
ScoreTimeRef | _scoreTime |
The shared pointer for ScoreTimeData. More... | |
sf::Sound | _crowdCheerOnGoal |
Sound effect for crowd cheering. More... | |
sf::Sound | _btnClickSfx |
Sound effect for button click. More... | |
sf::Sprite | _background |
Background sprite to draw on the screen. More... | |
sf::Sprite | _replayBtn |
Button to replay the game. More... | |
sf::Sprite | _exitBtn |
Button to exit the game. More... | |
sf::Text | _winnerText |
Text to display depending on who won or if it is a draw. More... | |
sf::Text | _score |
Final score of the game. More... | |
Class for game over or full-time state.
HeadBall::GameOver::GameOver | ( | GameDataRef | data, |
ScoreTimeRef | scoreTime | ||
) |
Construct a new Game Over object.
data | |
scoreTime |
|
inlinevirtualinherited |
Vitrual function for performing animations.
|
virtual |
Draw state objects.
Implements HeadBall::State.
|
virtual |
Handle user input.
Implements HeadBall::State.
|
virtual |
Initialize state related data.
Implements HeadBall::State.
|
inlinevirtualinherited |
Virtual function for pausing the state.
Reimplemented in HeadBall::GameState.
|
inlinevirtualinherited |
Virtual function for resuming the object.
Reimplemented in HeadBall::GameState.
|
virtual |
Update state data.
Implements HeadBall::State.
|
private |
Background sprite to draw on the screen.
|
private |
Sound effect for button click.
|
private |
Sound effect for crowd cheering.
|
private |
The shared pointer for GameData.
|
private |
Button to exit the game.
|
private |
Button to replay the game.
|
private |
Final score of the game.
|
private |
The shared pointer for ScoreTimeData.
|
private |
Text to display depending on who won or if it is a draw.