Struct SpriteFrames

Sprite frame library for AnimatedSprite.

struct SpriteFrames ;

Sprite frame library for AnimatedSprite. Contains frames and animation data for playback.

Properties

NameTypeDescription
animations[get, set] Array
frames[get, set] ArrayCompatibility property, always equals to an empty array.

Methods

NameDescription
_getAnimations
_getFrames
_setAnimations
_setFrames
addAnimation Adds a new animation to the library.
addFrame Adds a frame to the given animation.
clear Removes all frames from the given animation.
clearAll Removes all animations. A "default" animation will be created.
getAnimationLoop If true, the given animation will loop.
getAnimationNames Returns an array containing the names associated to each animation. Values are placed in alphabetical order.
getAnimationSpeed The animation's speed in frames per second.
getFrame Returns the animation's selected frame.
getFrameCount Returns the number of frames in the animation.
hasAnimation If true, the named animation exists.
removeAnimation Removes the given animation.
removeFrame Removes the animation's selected frame.
renameAnimation Changes the animation's name to newname.
setAnimationLoop If true, the animation will loop.
setAnimationSpeed The animation's speed in frames per second.
setFrame Sets the texture of the given frame.