AnimatedSprite3D
Inherits: SpriteBase3D < GeometryInstance < VisualInstance < Spatial < Node < Object
Category: Core
Brief Description
Member Functions
String | get_animation ( ) const |
int | get_frame ( ) const |
SpriteFrames | get_sprite_frames ( ) const |
bool | is_playing ( ) const |
void | play ( String anim=”” ) |
void | set_animation ( String animation ) |
void | set_frame ( int frame ) |
void | set_sprite_frames ( SpriteFrames sprite_frames ) |
void | stop ( ) |
Signals
- frame_changed ( )
Emitted when frame is changed.
Member Function Description
String get_animation ( ) const
Return the name of the current animation set to the node.
int get_frame ( ) const
Return the visible frame index.
SpriteFrames get_sprite_frames ( ) const
Get the SpriteFrames resource, which contains all frames.
bool is_playing ( ) const
Return true if an animation if currently being played.
void play ( String anim=”” )
Play the animation set in parameter. If no parameter is provided, the current animation is played.
void set_animation ( String animation )
Set the current animation of the node and reinits the frame counter of the animation.
void set_frame ( int frame )
Set the visible sprite frame index (from the list of frames inside the SpriteFrames resource).
void set_sprite_frames ( SpriteFrames sprite_frames )
Set the SpriteFrames resource, which contains all frames.
void stop ( )
Stop the current animation (does not reset the frame counter).
© 2014–2020 Juan Linietsky, Ariel Manzur, Godot Engine contributors
Licensed under the MIT License.
https://docs.godotengine.org/en/2.1/classes/class_animatedsprite3d.html