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.
instance | Empathy * |
Empathy | ( | ) |
The constructor.
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 |
return |
getMarginLeft | ( | ) |
return |
getMarginTop | ( | ) |
return |
getScreenSize | ( | ) |
return |
makeReadyToClose | ( | ) |
setScreenMargins | ( | int | , | |
int | ) |
set the OpenGL screen margins.
setScreenSize | ( | int | ) |
set the OpenGL screen sizes.
shouldClose | ( | ) |
return |
flush | ( | ) |
Terminator. More like destructor, but a terminator.
getTime | ( | ) |
Gets the current time for the game.
return |
init | ( | ) |
init the flavor-independent system ready.
loop | ( | ) |
Warning: Loop only. Does not contain the while (not gameOver)
condition. Just the code inside the while
loop.
Set the audio handler. For more information, see <MoonLight>.
m |