General purpose Sprite node.
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.
Return the texture frame for a sprite-sheet, works when vframes or hframes are greater than 1.
Return the amount of horizontal frames. See [method set_hframes].
Return sprite draw offset.
Return the region rect to read from.
Return the base texture for the sprite.
Return the amount of vertical frames. See [method set_vframes].
Return if the sprite is centered at the local origin.
Return true if the sprite is flipped horizontally.
Return true if the sprite is flipped vertically.
Return if the sprite reads from a region.
Set whether the sprite should be centered on the origin.
Set true to flip the sprite horizontally.
Set true to flip the sprite vertically.
Set the texture frame for a sprite-sheet, works when vframes or hframes are greater than 1.
Set the amount of horizontal frames and converts the sprite into a sprite-sheet. This is useful for animation.
Set the sprite draw offset, useful for setting rotation pivots.
Set the sprite as a sub-region of a bigger texture. Useful for texture-atlases.
Set the region rect to read from.
Set the base texture for the sprite.
Set the amount of vertical frames and converts the sprite into a sprite-sheet. This is useful for animation.
- If [code]true[/code] texture is 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].
- Current frame to display from sprite sheet. [member vframes] or [member hframes] must be greater than 1.
- The number of collumns in the sprite sheet.
- The normal map gives depth to the Sprite.
- The texture's drawing offset.
- If [code]true[/code] texture is cut from a larger atlas texture. See [code]region_rect[/code]. Default value: [code]false[/code].
- If [code]true[/code] the outermost pixels get blurred out.
- The region of the atlas texture to display. [member region_enabled] must be [code]true[/code].
- [Texture] object to draw.
- The number of rows in the sprite sheet.
Emitted when the [member frame] changes.
Emitted when the [member texture] changes.