[ Home ]

Library Documentation (v 0.12.1)

Scene

Scene management and control!

A Scene in Haxegon is a class with an update() function, and optionally with the following functions:
init() (called when you first change to this scene)
reset() (called every time your change to this scene)
render() (for optionally seperating your logic and drawing code)

The default Scene when your program starts is Main, but you can change this with the Scene.change() function.
Scene.change(newscene:Class)
Change the game's current scene.
Scene.restart(scenename:Class)
Discard and reload the named scene. Doesn't change to it (you still need to call Scene.change() afterwards), and doesn't have to be the currently running scene.