Inherits: Node2D<class_node2d>
< CanvasItem<class_canvasitem>
< Node<class_node>
< Object<class_object>
Category: Core
General purpose Sprite node.
- frame_changed ( )
Emitted when the frame<class_Sprite_frame>
changes.
- texture_changed ( )
Emitted when the texture<class_Sprite_texture>
changes.
bool<class_bool>
centered - Iftrue
texture is centered. Default value:true
.bool<class_bool>
flip_h - Iftrue
texture is flipped horizontally. Default value:false
.bool<class_bool>
flip_v - Iftrue
texture is flipped vertically. Default value:false
.int<class_int>
frame - Current frame to display from sprite sheet.vframes<class_Sprite_vframes>
orhframes<class_Sprite_hframes>
must be greater than 1.int<class_int>
hframes - The number of columns in the sprite sheet.Texture<class_texture>
normal_map - The normal map gives depth to the Sprite.Vector2<class_vector2>
offset - The texture's drawing offset.bool<class_bool>
region_enabled - Iftrue
texture is cut from a larger atlas texture. Seeregion_rect
. Default value:false
.bool<class_bool>
region_filter_clip - Iftrue
the outermost pixels get blurred out.Rect2<class_rect2>
region_rect - The region of the atlas texture to display.region_enabled<class_Sprite_region_enabled>
must betrue
.Texture<class_texture>
texture -Texture<class_texture>
object to draw.int<class_int>
vframes - The number of rows in the sprite sheet.
A node that displays a 2D texture. The texture displayed can be a region from a larger atlas texture, or a frame from a sprite sheet animation.