BrickOutGame Class Reference

Represents the BrickOut |ReDuX| Game. More...

#include <Game/BrickOutGame.h>

Inherits SDLApplication, LevelListener, TransitionEffectListener, and GameStateListener.

List of all members.

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.
MusicPlayerGetMusicPlayer ()
 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.

Detailed Description

Represents the BrickOut |ReDuX| Game.


Constructor & Destructor Documentation

BrickOutGame::BrickOutGame ( int  w = DEFAULT_WIDTH,
int  h = DEFAULT_HEIGHT,
bool  useFullscreen = false 
)

Constructor.

Parameters:
[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.

Member Function Documentation

bool BrickOutGame::BallLost ( Level level  )  [virtual]

Called when a ball is lost.

Parameters:
[in] level referance to the appropriate level.
Returns:
True if you wish to have another ball spawned. Return false to not have another ball spawned.

Implements LevelListener.

void BrickOutGame::ExtraBall ( Level level  )  [virtual]

Called when an extra ball is aquired.

Parameters:
[in] level referance to the level that called the method.

Implements LevelListener.

virtual std::string BrickOutGame::GetAppName (  )  [inline, virtual]

Gets the applications name.

Returns:
The name of the application.

Reimplemented from SDLApplication.

const char * BrickOutGame::GetIconName (  )  [virtual]

Returns the image name of the application icon.

Returns:
The file name of the icon or NULL if there is no icon.

Reimplemented from SDLApplication.

bool BrickOutGame::IsPaused (  )  const [virtual]

Returns if the application is paused or not.

Returns:
True if the application is paused or false if the application is unpaused.

Reimplemented from SDLApplication.

void BrickOutGame::LoadLevel ( const char *  levelName  ) 

Loads the given level.

Parameters:
[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.

Parameters:
[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.

Parameters:
[in] effect the transition effect.

Reimplemented from TransitionEffectListener.

void BrickOutGame::OnTransitionInCompleted ( TransitionEffect effect,
Transition trans 
) [protected, virtual]

Called when a transition in is completed.

Parameters:
[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.

Parameters:
[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.

Parameters:
[in] level referance to the appropriate level.
[in] amt the score that the user aquired.

Implements LevelListener.


The documentation for this class was generated from the following files:
Generated on Mon Apr 5 19:08:05 2010 for BrickOut |ReDuX| by  doxygen 1.6.3