Classempathy::Empathy
empathy
Variables
Constructors
Member Functions

Classempathy::Empathy

So how'd your own flavor? 1. Override this class. 3. override getTime() to return a time 4. override the terminate() to call upon the termination 5. override the run() function. This function is used to begin the app at user's will.

Now, let's call your flavor Salamander. You'd want to

Salamander * sal=new Salamander();
JSONBrain * brain= new JSONBrian("instructions_file.json");
brain->addTo(sal);
sal->run();

in your main() function.

If you want the audio, set the <MoonLight> using <setMoonLight()> method on your Salamander. NOTE: you can't directly play the audio using <MoonLight>. See <MoonLight> for more info.

Variables

instance Empathy *

Constructors

Empathy ( )

The constructor.

Member Functions

void
addBrain ( brain::Brain * brain )

Deprecated to use this method directly. Recommended to use brain->addTo(empathy).

Call this function from the overridden addTo() method on the brain only.

brain
  • static
getInstance ( )
return
GLuint
getMarginLeft ( )
return
GLuint
getMarginTop ( )
return
GLuint
getScreenSize ( )
return
void
makeReadyToClose ( )
  • virtual
  • abstract
void
run ( )

The method called to activate empathy::Empathy::Empathy.

void
setScreenMargins ( int ,
int )

set the OpenGL screen margins.

void
setScreenSize ( int )

set the OpenGL screen sizes.

  • virtual
bool
shouldClose ( )
return
  • protected
  • virtual
void
flush ( )

Terminator. More like destructor, but a terminator.

  • protected
  • virtual
  • abstract
GLfloat
getTime ( )

Gets the current time for the game.

return
  • protected
  • virtual
void
init ( )

init the flavor-independent system ready.

  • protected
  • virtual
void
loop ( )

Warning: Loop only. Does not contain the while (not gameOver) condition. Just the code inside the while loop.

  • protected
void
setMoonLight ( moonlight::MoonLight * m )

Set the audio handler. For more information, see <MoonLight>.

m