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

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.

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).

Set the SpriteFrames resource, which contains all frames.

  • void stop ( )

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