class com.genome2d.Genome2D

Available on all platforms

Genome2D core class

Class Fields

static var VERSION:String

Genome2D Version

static function getInstance():Genome2D

Get the singleton instance of Genome2D

Instance Fields

var autoUpdateAndRender:Bool

Enable/disable auto updating and rendering of Genome2D node graph

default true

var onFailed:Signal1<String>

Signal dispatched when Genome2D fails to initialize

Sends reason message

var onInitialized:Signal0

Signal dispatched when Genome2D initializes successfully

var onInvalidated:Signal0

Signal dispatched when Genome2D is invalidated

var onKeySignal:Signal1<GKeyboardSignal>

Signal dispatched when Genome2D processes keyboard signals

var onPostRender:Signal0

Signal dispatched when Genome2D is rendering, after it rendered its own node graph

var onPreRender:Signal0

Signal dispatched when Genome2D is rendering, before it renders its own node graph

var onUpdate:Signal1<Float>

Signal dispatched when Genome2D is updated to next frame

Sends deltaTime Float passed between updates

var root:GNode

Root GNode the parent of the whole node graph

function dispose():Void

Dispose Genome2D framework

function getContext():IContext

function getCurrentFrameDeltaTime():Float

Return current frame delta time

function getCurrentFrameId():Int

Return current Genome2D frame Id

function getRunTime():Float

Return current Genome2D time from start

function init(p_config:GContextConfig):Void

Initialize Genome2D

@param p_config GContextConfig instance configuring Genome2D context

function render(?p_camera:GCameraController = null):Void

Render node graph

This method is called automatically if autoUpdateAndRender is true

function update(p_deltaTime:Float):Void

Update node graph

This method is called automatically if autoUpdateAndRender is true