Main game Sprite class, added to the Stage. Manages the game loop.
Your main class needs to extends this.
Constructor
new (width : Int = 0, height : Int = 0, frameRate : Float = 60, fixed : Bool = false) : Void
Constructor. Defines startup information about your game.
Parameters:
width | The width of your game. | |
height | The height of your game. | |
frameRate | The game framerate, in frames per second. | |
fixed | If a fixed-framerate should be used. |
Variables
maxElapsed : Float
Cap on the elapsed time (default at 30 FPS). Raise this to allow for lower framerates (eg. 1 / 10).
The currently active Scene object. When you set this, the Scene is flagged to switch, but won't actually do so until the end of the current frame.
Functions
onRender () : Void
Called from OpenGLView render. Any visible scene will have its draw commands rendered to OpenGL.
Pop a scene from the stack. The current scene will remain active until the next update.
Available since:
2.5.3
pushScene (value : Scene) : Void
Push a scene onto the stack. It will not become active until the next update.
Parameters:
value | The scene to push |
Available since:
2.5.3