JApp Class Reference

#include <JApp.h>

List of all members.

Public Member Functions

virtual void Create ()=0
virtual void Destroy ()=0
virtual void Update ()=0
virtual void Render ()=0
virtual void Pause ()=0
virtual void Resume ()=0


Detailed Description

Main application class for the system to run. The core game class should be derived from this base class.

Member Function Documentation

virtual void JApp::Create (  )  [pure virtual]

Initialization function.

virtual void JApp::Destroy (  )  [pure virtual]

Cleanup function before exiting from the game.

virtual void JApp::Update (  )  [pure virtual]

Update function to be called for each frame update. Should perform all the game logic here.

Example: A simple Update() implementation:
 void Update()
 {
                float dt = JGE::GetInstance()->GetDelta();
                mX += mSpeed*dt;
 }

virtual void JApp::Render (  )  [pure virtual]

Render function to be called for each frame update. Should do all the game rendering here.

Example: A simple Render() implementation:
 void Render()
 {
                JRenderer *r = JRenderer::GetInstance();
                r->FillRect(0,0,480,272,ARGB(255,0,0,0));
 }

virtual void JApp::Pause (  )  [pure virtual]

Callback function called when the game is paused by the system.

virtual void JApp::Resume (  )  [pure virtual]

Callback function called when the game is resumed by the system.


Generated on Mon Oct 22 00:28:22 2007 for JGE++ by  doxygen 1.5.3