Sprite
Methods
sheetLocation
Returns the x, y position of a sprite on the sprite sheet.
sprite:sheetLocation() -> object
draw
Draws the sprite on the canvas according to the properties.
sprite:draw() -> none
Properties
invis
- Type:
boolean
True if the sprite is invisible.
moveable
- Type:
boolean
True if the sprite moves.
velocity
- Type:
number
The animation speed of the spritesheet.
frames
- Type:
object
The x and y spritesheet values.
scale
- Type:
number
Size multiplier of the sprite.
image
- Type:
Image
Image to represent the sprite.
position
- Type:
object
Position of the sprite on the canvas.