reference monoe.node

Lua API Reference

This is a simple node, that can allow you to structurate your scenes.

Properties

NameTypeDescription
uidinteger

monoe.node.new

Creates a new node.

Returns


monoe.node:attach

Attaches an object to the node state.

Parameters

NameTypeDescription
stateany

monoe.node:move

Moves the set of objects.

Parameters

NameTypeDescription
xnumberHorizontal velocity
ynumberVertical velocity

monoe.node:position

Gets or sets the position of the node in 2D space. If `x` and `y` are provided, the node is moved to that position.

Parameters

NameTypeDescription
xnumber|nilX-coordinate to set (optional)
ynumber|nilY-coordinate to set (optional)

Returns


monoe.node:scale

Scales the node in X and Y directions.

Parameters

NameTypeDescription
xnumberScale factor along the X-axis
ynumberScale factor along the Y-axis

Returns


monoe.node:free

Releases engine resources used by this node. After calling this, the node should no longer be used.


monoe.node:remove

Removes the instance from the rendering side.