The Sprite class¶
The Sprite class is used to display images on the screen. See Working with visuals for a quick explanation on how to use them.
Properties¶
| Type | Name | Default value | Description |
|---|---|---|---|
| bool | visible | false | Gets whether or not the sprite is currently being shown in the screen |
Member functions¶
| Method | Description |
|---|---|
| (constructor) | Create a Sprite object |
| show | Make the sprite visible |
| hide | Make the sprite invisible |
| setAlpha | Set the opacity of the sprite |
| skipTransition | Instantly finish any transition affecting this object |
| setPosition | Set the position of the sprite |
| getPosition | Get the position of the sprite |
| setOrigin | Set the origin of the sprite |
| move | Start a movement animation |
| defineSpriteSheet | Animate this sprite as a sprite sheet |
| setFrame | Manually set the current frame of the sprite sheet animation |