reference monoe.sprite

Lua API Reference

Properties

NameTypeDescription
uidintegerUnique ID for the engine-side sprite object

monoe.sprite.new

Creates a new `monoe.sprite` object. If a path is provided, it will load it as an image.

Parameters

NameTypeDescription
pathstring|nilFile path to load as the sprite image

Returns


monoe.sprite:clear

Clears the sprite image.


monoe.sprite:load

Loads an image into the sprite.

Parameters

NameTypeDescription
pathstring|integer|monoe.imageFile path of the image

monoe.sprite:position

Sets or gets the position of the sprite.

Parameters

NameTypeDescription
xnumber|nil
ynumber|nil

Returns


monoe.sprite:move

Moves the sprite by the specified offset.

Parameters

NameTypeDescription
xnumber
ynumber

Returns


monoe.sprite:scale

Scales the sprite.

Parameters

NameTypeDescription
xnumber
ynumber

Returns


monoe.sprite:image

Returns the sprite's image object.

Returns


monoe.sprite:free

Frees engine resources associated with this sprite.


monoe.sprite:remove

Removes the instance from the rendering side.