node2d

inline fun Node.node2d(callback: Node2D.() -> Unit = {}): Node2D

Adds a Node2D to the current Node as a child and then triggers the callback

Return

the newly created Node2D

Parameters

callback

the callback that is invoked with a Node2D context in order to initialize any values


inline fun SceneGraph<*>.node2d(callback: Node2D.() -> Unit = {}): Node2D

Adds a Node2D to the current SceneGraph.root as a child and then triggers the Node2D

Return

the newly created Node2D

Parameters

callback

the callback that is invoked with a Node2D context in order to initialize any values