public class GameLoop
extends java.lang.Object
implements playn.core.Game
Constructor and Description |
---|
GameLoop() |
Modifier and Type | Method and Description |
---|---|
void |
init()
Initilizes all the game variables before starting the game.
|
void |
paint(float alpha)
Paints all the images contained in the scene graph layers.
|
void |
update(float delta)
All the updates to the game logic should be called here.
|
int |
updateRate()
Return the update rate of the main game loop, in ms.
|
public void init()
init
in interface playn.core.Game
http://docs.playn.googlecode.com/git/javadoc/index.html
public void paint(float alpha)
paint
in interface playn.core.Game
alpha
- - a value between 0 and 1, representing the proportion of time passed between the last two update tickshttp://docs.playn.googlecode.com/git/javadoc/index.html
public void update(float delta)
update
in interface playn.core.Game
delta
- - time, in ms, passed since the previous update(float)http://docs.playn.googlecode.com/git/javadoc/index.html
public int updateRate()
updateRate
in interface playn.core.Game
http://docs.playn.googlecode.com/git/javadoc/index.html