SpriteFrames

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.

Members

Aliases

BaseClasses
alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses)
Undocumented in source.

Functions

_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()

Mixins

__anonymous
mixin baseCasts
Undocumented in source.

Properties

animations
Array animations [@property getter]
Array animations [@property setter]
frames
Array frames [@property getter]
Array frames [@property setter]

Compatibility property, always equals to an empty array.

Static functions

_new
SpriteFrames _new()

Construct a new instance of SpriteFrames. Note: use memnew!SpriteFrames instead.

Static variables

_classBindingInitialized
bool _classBindingInitialized;
Undocumented in source.

Structs

GDNativeClassBinding
struct GDNativeClassBinding
Undocumented in source.

Unions

__anonymous
union __anonymous
Undocumented in source.

Variables

_GODOT_internal_name
enum string _GODOT_internal_name;
Undocumented in source.

Mixed In Members

From mixin baseCasts

as
inout(To) as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
inout(To) as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
inout(ToRef) as()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(ToRef)
Undocumented in source.
opCast
void* opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
godot_object opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
bool opCast()
Undocumented in source. Be warned that the author may not have intended to support it.

Meta