AnimatedSprite

Sprite node that can use multiple textures for animation.

Animations are created using a SpriteFrames resource, which can be configured in the editor via the SpriteFrames panel.

Members

Aliases

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

Functions

_isPlaying
bool _isPlaying()
_resChanged
void _resChanged()
_setPlaying
void _setPlaying(bool playing)
getAnimation
String getAnimation()
getFrame
long getFrame()
getOffset
Vector2 getOffset()
getSpeedScale
double getSpeedScale()
getSpriteFrames
Ref!SpriteFrames getSpriteFrames()
isCentered
bool isCentered()
isFlippedH
bool isFlippedH()
isFlippedV
bool isFlippedV()
isPlaying
bool isPlaying()

Return true if an animation if currently being played.

opAssign
AnimatedSprite opAssign(T n)
Undocumented in source. Be warned that the author may not have intended to support it.
opEquals
bool opEquals(AnimatedSprite other)
Undocumented in source. Be warned that the author may not have intended to support it.
opEquals
bool opEquals(typeof(null) n)
Undocumented in source. Be warned that the author may not have intended to support it.
play
void play(StringArg0 anim)

Play the animation set in parameter. If no parameter is provided, the current animation is played.

setAnimation
void setAnimation(StringArg0 animation)
setCentered
void setCentered(bool centered)
setFlipH
void setFlipH(bool flip_h)
setFlipV
void setFlipV(bool flip_v)
setFrame
void setFrame(long frame)
setOffset
void setOffset(Vector2 offset)
setSpeedScale
void setSpeedScale(double speed_scale)
setSpriteFrames
void setSpriteFrames(SpriteFrames sprite_frames)
stop
void stop()

Stop the current animation (does not reset the frame counter).

Mixins

__anonymous
mixin baseCasts
Undocumented in source.

Properties

animation
String animation [@property getter]
String animation [@property setter]

The current animation from the frames resource. If this value changes, the frame counter is reset.

centered
bool centered [@property getter]
bool centered [@property setter]

If true texture will be centered. Default value: true.

flipH
bool flipH [@property setter]

If true texture is flipped horizontally. Default value: false.

flipH
bool flipH [@property getter]

If true texture is flipped horizontally. Default value: false.

flipV
bool flipV [@property getter]
bool flipV [@property setter]

If true texture is flipped vertically. Default value: false.

frame
long frame [@property getter]
long frame [@property setter]

The displayed animation frame's index.

frames
SpriteFrames frames [@property getter]
SpriteFrames frames [@property setter]

The SpriteFrames resource containing the animation(s).

offset
Vector2 offset [@property getter]
Vector2 offset [@property setter]

The texture's drawing offset.

playing
bool playing [@property getter]
bool playing [@property setter]

If true the animation is currently playing.

speedScale
double speedScale [@property getter]
double speedScale [@property setter]

Static functions

_new
AnimatedSprite _new()
Undocumented in source. Be warned that the author may not have intended to support it.

Static variables

_classBindingInitialized
bool _classBindingInitialized;
Undocumented in source.

Structs

_classBinding
struct _classBinding
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
To as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
To as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
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