Struct AnimatedSprite3D
2D sprite node in 3D world, that can use multiple 2D textures for animation.
struct AnimatedSprite3D
;
Animations are created using a SpriteFrames
resource, which can be configured in the editor via the SpriteFrames panel.
Properties
Name | Type | Description |
---|---|---|
animation [get, set]
|
String | The current animation from the frames resource. If this value changes, the frame counter is reset.
|
frame [get, set]
|
long | The displayed animation frame's index. |
frames [get, set]
|
SpriteFrames | The SpriteFrames resource containing the animation(s).
|
playing [get, set]
|
bool | If true , the animation is currently playing.
|
Methods
Name | Description |
---|---|
_isPlaying
|
|
_resChanged
|
|
_setPlaying
|
|
getAnimation
|
|
getFrame
|
|
getSpriteFrames
|
|
isPlaying
|
Returns true if an animation is currently being played.
|
play
|
Plays the animation named anim . If no anim is provided, the current animation is played.
|
setAnimation
|
|
setFrame
|
|
setSpriteFrames
|
|
stop
|
Stops the current animation (does not reset the frame counter). |