Module ncine.sprite

The table containing sprite related functions.

Inherits from ncine.base_sprite.

Functions

ncine.sprite.new (parent, texture, x, y) Constructs a sprite object with a parent scene node, a texture, and position components.
ncine.sprite.new (parent, texture, pos) Constructs a sprite object with a parent scene node, a texture, and a position vector.
ncine.sprite.clone (sprite) Constructs a new sprite object as a clone of the specified one.
ncine.sprite.delete (sprite) Destroys a sprite object and releases its memory

Tables

spriteObj The light user data of a sprite object.


Functions

ncine.sprite.new (parent, texture, x, y)
Constructs a sprite object with a parent scene node, a texture, and position components.

Don’t forget to call ncine.sprite.delete when you are done with it!

Parameters:

Returns:

    spriteObj A new sprite object
ncine.sprite.new (parent, texture, pos)
Constructs a sprite object with a parent scene node, a texture, and a position vector.

Don’t forget to call ncine.sprite.delete when you are done with it!

Parameters:

Returns:

    spriteObj A new sprite object
ncine.sprite.clone (sprite)
Constructs a new sprite object as a clone of the specified one.

Don’t forget to call ncine.sprite.delete when you are done with it!

Parameters:

  • sprite spriteObj The sprite object to be cloned

Returns:

    spriteObj The cloned sprite object
ncine.sprite.delete (sprite)
Destroys a sprite object and releases its memory

Parameters:

  • sprite spriteObj The sprite object to be destroyed

Tables

spriteObj
The light user data of a sprite object.

Inherits from ncine.base_sprite.basespriteObj.

generated by LDoc 1.5.0 Last updated 2024-12-18 15:08:56