a set of rectangle delimiting the part of the sprite sheet for each frame.
a set of return delimiting the zone where the frame must be drawn. The position of the destRects is overwritten as the sprite is moved around.
Position of the sprite defined by anchor Do not set components of the position directly, it will not update it properly. Instead, assign to the property:
Position of the sprite defined by anchor Do not set components of the position directly, it will not update it properly. Instead, assign to the property:
The rect bounding the sprite, taking scaling into account.
add animation
name of animation
frame to begin from
frame to end at
delay between each frame
play animation
name of animation to play
Draw the sprite on a canvas.
stop the sprite animation
Called on each frame to update sprite states
delta time
Generated using TypeDoc
A sprite that holds an animation based on a sprite sheet. Needs to be updated on each frame for the animation to play.