![]() |
HeadBall
1.0
A game
|
Derived class of State class with visibility mode public that checks whether the player has scored goal or not and updates the state. More...
#include <GoalState.hpp>
Public Member Functions | |
GoalState (GameDataRef data, ScoreTimeRef scoretime, bool isSecondHalf) | |
Construct a new Goal State object. More... | |
void | init () |
Initialze a new GoalState object. More... | |
void | handleInput () |
Handles all the input during goalstate. More... | |
void | update () |
Updates the rendering window as per the provided inputs. More... | |
void | draw () |
Draws all the SFML objects of Goal state. 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 |
Shared pointer for game data. More... | |
ScoreTimeRef | _scoreTime |
Shared pointer for score and time. More... | |
sf::Sound | _crowdCheerOnGoal |
Croud cheering sound. More... | |
sf::Sprite | _background |
Background sprite to draw on the screen. More... | |
bool | _isSecondHalf |
Store whether it is first half or second. More... | |
int | _animationCounter |
Counter for animation of movements. More... | |
Derived class of State class with visibility mode public that checks whether the player has scored goal or not and updates the state.
HeadBall::GoalState::GoalState | ( | GameDataRef | data, |
ScoreTimeRef | scoretime, | ||
bool | isSecondHalf | ||
) |
Construct a new Goal State object.
data | The shared pointer of GameData |
scoretime | The shared pointer of ScoreTimeData |
isSecondHalf | The boolean variable that checks whether the half is second or not |
|
inlinevirtualinherited |
Vitrual function for performing animations.
|
virtual |
Draws all the SFML objects of Goal state.
Implements HeadBall::State.
|
virtual |
Handles all the input during goalstate.
Implements HeadBall::State.
|
virtual |
Initialze a new GoalState object.
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 |
Updates the rendering window as per the provided inputs.
Implements HeadBall::State.
|
private |
Counter for animation of movements.
|
private |
Background sprite to draw on the screen.
|
private |
Croud cheering sound.
|
private |
Shared pointer for game data.
|
private |
Store whether it is first half or second.
|
private |
Shared pointer for score and time.