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.
Return the name of the current animation set to the node.
Return the visible frame index.
Return the offset of the sprite in the node origin.
Get the [SpriteFrames] resource, which contains all frames.
Return true when centered. See [method set_centered].
Return true if sprite is flipped horizontally.
Return true if sprite is flipped vertically.
Return true if an animation if currently being played.
Play the animation set in parameter. If no parameter is provided, the current animation is played.
Set the current animation of the node and reinits the frame counter of the animation.
When turned on, offset at (0,0) is the center of the sprite, when off, the top-left corner is.
If true, sprite is flipped horizontally.
If true, sprite is flipped vertically.
Set the visible sprite frame index (from the list of frames inside the [SpriteFrames] resource).
Set the offset of the sprite in the node origin. Position varies depending on whether it is centered or not.
Set the [SpriteFrames] resource, which contains all frames.
Stop the current animation (does not reset the frame counter).
- The current animation from the [code]frames[/code] resource. If this value changes, the [code]frame[/code] counter is reset.
- If [code]true[/code] texture will be centered. Default value: [code]true[/code].
- If [code]true[/code] texture is flipped horizontally. Default value: [code]false[/code].
- If [code]true[/code] texture is flipped vertically. Default value: [code]false[/code].
- The displayed animation frame's index.
- The [SpriteFrames] resource containing the animation(s).
- The texture's drawing offset.
- If [code]true[/code] the [member animation] is currently playing.
Emitted when the animation is finished (when it plays the last frame). If the animation is looping, this signal is emitted every time the last frame is drawn.
Emitted when [member frame] changed.