-
Notifications
You must be signed in to change notification settings - Fork 0
class_animatedsprite
####Inherits: Node2D ####Category: Core
Sprite node that can use multiple textures for animation.
- void set_sprite_frames ( SpriteFrames sprite_frames )
- SpriteFrames get_sprite_frames ( ) const
- void set_centered ( bool centered )
- bool is_centered ( ) const
- void set_offset ( Vector2 offset )
- Vector2 get_offset ( ) const
- void set_flip_h ( bool flip_h )
- bool is_flipped_h ( ) const
- void set_flip_v ( bool flip_v )
- bool is_flipped_v ( ) const
- void set_frame ( int frame )
- int get_frame ( ) const
- void set_modulate ( Color modulate )
- Color get_modulate ( ) const
Sprite node that can use multiple textures for animation.
- void set_sprite_frames ( SpriteFrames sprite_frames )
Set the SpriteFrames resource, which contains all frames.
- SpriteFrames get_sprite_frames ( ) const
Get the SpriteFrames resource, which contains all frames.
- void set_centered ( bool centered )
When turned on, offset at (0,0) is the center of the sprite, when off, the top-left corner is.
- bool is_centered ( ) const
Return true when centered. See [set_centered].
- void set_offset ( Vector2 offset )
Set the offset of the sprite in the node origin. Position varies depending on whether it is centered or not.
- Vector2 get_offset ( ) const
Return the offset of the sprite in the node origin.
- void set_flip_h ( bool flip_h )
If true, sprite is flipped horizontally.
- bool is_flipped_h ( ) const
Return true if sprite is flipped horizontally.
- void set_flip_v ( bool flip_v )
If true, sprite is flipped vertically.
- bool is_flipped_v ( ) const
Return true if sprite is flipped vertically.
- void set_frame ( int frame )
Set the visible sprite frame index (from the list of frames inside the SpriteFrames resource).
- int get_frame ( ) const
Return the visible frame index.
- void set_modulate ( Color modulate )
Change the color modulation (multiplication) for this sprite.
- Color get_modulate ( ) const
Return the color modulation for this sprite.