CRpsGameEngine Class Reference

Inherits MAppViewObserver.

List of all members.

Public Member Functions

virtual ~CRpsGameEngine ()
void FocusChanged (TBool aFocus)
void KeyEvent (TUint &aKeyState)
void DrawGameScreen ()
void StartHeartbeat ()
void StopHeartbeat (TBool aTimedOut=EFalse)
void PauseGame ()
void UnpauseGame ()

Static Public Member Functions

static CRpsGameEngineNewL (MEngineObserver &aObs)
static TInt Tick (TAny *aCallback)

Detailed Description

Definition at line 48 of file rpsGameEngine.h.

Constructor & Destructor Documentation

CRpsGameEngine::~CRpsGameEngine (  )  [virtual]

~CRpsGameEngine Virtual Destructor.

Definition at line 120 of file rpsGameEngine.cpp.

Member Function Documentation

CRpsGameEngine * CRpsGameEngine::NewL ( MEngineObserver aObs  )  [static]

NewL. Two-phased constructor. Create a CRpsGameEngine object. aObs a reference to the engine observer

Definition at line 82 of file rpsGameEngine.cpp.

void CRpsGameEngine::FocusChanged ( TBool  aFocus  )  [virtual]

Called by framework when application focus changes aFocus Indicates whether the focus has or has not changed

Implements MAppViewObserver.

Definition at line 174 of file rpsGameEngine.cpp.

void CRpsGameEngine::KeyEvent ( TUint &  aKeyState  )  [virtual]

Handles key events generated by the player aKeyState the key that was pressed

Implements MAppViewObserver.

Definition at line 191 of file rpsGameEngine.cpp.

void CRpsGameEngine::DrawGameScreen (  )  [virtual]

Update the application view with the current game screen

Implements MAppViewObserver.

Definition at line 203 of file rpsGameEngine.cpp.

TInt CRpsGameEngine::Tick ( TAny *  aCallback  )  [static]

Static callback method used by the periodic timer Calls GameLoop() aCallback pointer to the callback function

Definition at line 235 of file rpsGameEngine.cpp.

void CRpsGameEngine::StartHeartbeat (  ) 

Starts the heartbeat timer to drive the game loop

Definition at line 139 of file rpsGameEngine.cpp.

void CRpsGameEngine::StopHeartbeat ( TBool  aTimedOut = EFalse  ) 

Stops the heartbeat time and pauses the game loop aTimedOut boolean indicates whether the inactivity timeout has expired ETrue if it has (because the user hasn't interacted with the game) EFalse if the heartbeat is stopping because the game has lost focus or is exiting

Definition at line 153 of file rpsGameEngine.cpp.

void CRpsGameEngine::PauseGame (  ) 

Pause the game in the event of a timeout

Definition at line 215 of file rpsGameEngine.cpp.

void CRpsGameEngine::UnpauseGame (  ) 

Called when input is received to bring it out of pause

Definition at line 227 of file rpsGameEngine.cpp.

Generated by  doxygen 1.6.2