- _getAnimations
Array _getAnimations()
- _getFrames
Array _getFrames()
- _setAnimations
void _setAnimations(Array arg0)
- _setFrames
void _setFrames(Array arg0)
- addAnimation
void addAnimation(String anim)
Adds a new animation to the library.
- addFrame
void addFrame(String anim, Texture frame, long at_position)
Adds a frame to the given animation.
- clear
void clear(String anim)
Removes all frames from the given animation.
- clearAll
void clearAll()
Removes all animations. A "default" animation will be created.
- getAnimationLoop
bool getAnimationLoop(String anim)
Returns true if the given animation is configured to loop when it finishes playing. Otherwise, returns false.
- getAnimationNames
PoolStringArray getAnimationNames()
Returns an array containing the names associated to each animation. Values are placed in alphabetical order.
- getAnimationSpeed
double getAnimationSpeed(String anim)
The animation's speed in frames per second.
- getFrame
Ref!Texture getFrame(String anim, long idx)
Returns the animation's selected frame.
- getFrameCount
long getFrameCount(String anim)
Returns the number of frames in the animation.
- hasAnimation
bool hasAnimation(String anim)
If true, the named animation exists.
- opAssign
typeof(null) opAssign(typeof(null) n)
- opEquals
bool opEquals(SpriteFrames other)
- opEquals
bool opEquals(typeof(null) n)
- removeAnimation
void removeAnimation(String anim)
Removes the given animation.
- removeFrame
void removeFrame(String anim, long idx)
Removes the animation's selected frame.
- renameAnimation
void renameAnimation(String anim, String newname)
Changes the animation's name to newname.
- setAnimationLoop
void setAnimationLoop(String anim, bool loop)
If true, the animation will loop.
- setAnimationSpeed
void setAnimationSpeed(String anim, double speed)
The animation's speed in frames per second.
- setFrame
void setFrame(String anim, long idx, Texture txt)
Sets the texture of the given frame.
- toHash
size_t toHash()
Sprite frame library for AnimatedSprite.
Sprite frame library for AnimatedSprite. Contains frames and animation data for playback. Note: You can associate a set of normal maps by creating additional SpriteFrames resources with a _normal suffix. For example, having 2 SpriteFrames resources run and run_normal will make it so the run animation uses the normal map.