class Manager
package nb
It's in charge of calling the update
functions of NBase's
classes and instances and contains some useful functions.
0.1.0
.Static variables
staticlogging:Bool = false
Whether this class should use traces. true
by default if compiler flag debug
is defined.
staticnextFrames:Int = 0
If pause
is set to true
, classes and instances will still be updated for this amount of frames.
staticfinalread onlysceneClasses:{firstscene:FirstScene>} = Macros.makeScenes()
All nb.Scene
s classes in the project's "src/scenes" folder.
Static methods
staticaddInteractiveUpdate(i:Interactive, pos:Int = -1):Void
Adds an nb.Interactive
instance to the update queue.
staticaddObjectUpdate(obj:Object, pos:Int = -1, force:Bool = false):Void
Adds an nb.Object
instance to the update queue.
staticchangeScene(name:String, disposeScene:Bool = false):Scene
Changes the displayed scene.
Parameters:
name | Unique name of the scene to be displayed, the one given at creation. |
---|---|
disposeScene | Whether the current scene displayed should be disposed. |
Returns:
The newly displayed nb.Scene
instance. If null
no scene change was made.
staticcreateScene(sceneClass:Class<Scene>, name:String = "unnamed", ?args:Array<Dynamic>):Scene
Creates a scene.
Parameters:
sceneClass | The class of the |
---|---|
name | A unique name the |
args | Parameters to pass to the |
Returns:
The created nb.Scene
instance.
staticgetMouseCoords(global:Bool = false, ?scene:Scene):Point
Returns the mouse coordinates on the scene.