Represents the BrickOut |ReDuX| Game. More...
#include <Game/BrickOutGame.h>
Inherits SDLApplication, LevelListener, TransitionEffectListener, and GameStateListener.
Public Member Functions | |
BrickOutGame (int w=DEFAULT_WIDTH, int h=DEFAULT_HEIGHT, bool useFullscreen=false) | |
Constructor. | |
virtual | ~BrickOutGame () |
Deconstructor. | |
virtual const char * | GetIconName () |
Returns the image name of the application icon. | |
virtual void | TogglePause () |
Pauses the application if it is unpaused or unpauses the application if it is paused. | |
virtual void | Pause () |
Pauses the application. | |
virtual void | UnPause () |
Unpauses the application. | |
virtual bool | IsPaused () const |
Returns if the application is paused or not. | |
void | LoadLevel (const char *levelName) |
Loads the given level. | |
void | ClearHighScores () |
Clears all hich scores. | |
virtual bool | BallLost (Level &level) |
Called when a ball is lost. | |
virtual void | ExtraBall (Level &level) |
Called when an extra ball is aquired. | |
virtual void | ScoreIncrease (Level &level, int amt) |
Called when the user earns some points. | |
virtual std::string | GetAppName () |
Gets the applications name. | |
MusicPlayer & | GetMusicPlayer () |
Returns the games music player. | |
Protected Member Functions | |
virtual void | OnStateChangeRequest (const GameState &gs, GameState::State requested) |
Called when a state change request is made. | |
virtual void | OnForcedStateChange (const GameState &gs, GameState::State state) |
Called when a state change is forcefully made. | |
virtual void | OnPreStateTransition (const GameState &gs, GameState::State current, GameState::State next) |
Called before a state transition is made. | |
virtual void | OnPostStateTransition (const GameState &gs, GameState::State current, GameState::State last) |
Called after a state transition is made. | |
virtual void | OnTransitionOutCompleted (TransitionEffect &effect, Transition &trans) |
Called when a transition out is completed. | |
virtual void | OnTransitionInCompleted (TransitionEffect &effect, Transition &trans) |
Called when a transition in is completed. | |
virtual void | OnTransitionDelayCompleted (TransitionEffect &effect, Transition &trans) |
Called when a transition delay is completed. | |
virtual void | OnTransitionEffectCompleted (TransitionEffect &effect) |
Called when the transition effect is completed. |
Represents the BrickOut |ReDuX| Game.
BrickOutGame::BrickOutGame | ( | int | w = DEFAULT_WIDTH , |
|
int | h = DEFAULT_HEIGHT , |
|||
bool | useFullscreen = false | |||
) |
Constructor.
[in] | w | the initial width of the application screen. Defaults to DEFAULT_WIDTH. |
[in] | h | the initial height of the application screen. Defaults to DEFAULT_HEIGHT. |
[in] | useFullscreen | set to true to start the application fullscreen. Defaults to false. |
bool BrickOutGame::BallLost | ( | Level & | level | ) | [virtual] |
Called when a ball is lost.
[in] | level | referance to the appropriate level. |
Implements LevelListener.
void BrickOutGame::ExtraBall | ( | Level & | level | ) | [virtual] |
Called when an extra ball is aquired.
[in] | level | referance to the level that called the method. |
Implements LevelListener.
virtual std::string BrickOutGame::GetAppName | ( | ) | [inline, virtual] |
const char * BrickOutGame::GetIconName | ( | ) | [virtual] |
Returns the image name of the application icon.
Reimplemented from SDLApplication.
bool BrickOutGame::IsPaused | ( | ) | const [virtual] |
Returns if the application is paused or not.
Reimplemented from SDLApplication.
void BrickOutGame::LoadLevel | ( | const char * | levelName | ) |
Loads the given level.
[in] | levelName | the name of the level to load. |
void BrickOutGame::OnTransitionDelayCompleted | ( | TransitionEffect & | effect, | |
Transition & | trans | |||
) | [protected, virtual] |
Called when a transition delay is completed.
[in] | effect | the transition effect. |
[in] | trans | the transition that completed. |
Reimplemented from TransitionEffectListener.
void BrickOutGame::OnTransitionEffectCompleted | ( | TransitionEffect & | effect | ) | [protected, virtual] |
Called when the transition effect is completed.
[in] | effect | the transition effect. |
Reimplemented from TransitionEffectListener.
void BrickOutGame::OnTransitionInCompleted | ( | TransitionEffect & | effect, | |
Transition & | trans | |||
) | [protected, virtual] |
Called when a transition in is completed.
[in] | effect | the transition effect. |
[in] | trans | the transition that completed. |
Reimplemented from TransitionEffectListener.
void BrickOutGame::OnTransitionOutCompleted | ( | TransitionEffect & | effect, | |
Transition & | trans | |||
) | [protected, virtual] |
Called when a transition out is completed.
[in] | effect | the transition effect. |
[in] | trans | the transition that completed. |
Reimplemented from TransitionEffectListener.
void BrickOutGame::ScoreIncrease | ( | Level & | level, | |
int | amt | |||
) | [virtual] |
Called when the user earns some points.
[in] | level | referance to the appropriate level. |
[in] | amt | the score that the user aquired. |
Implements LevelListener.