Sprite Object.
More...
#include <game.h>
|
| asw::Quad< float > | transform |
| | The transform of the object.
|
| |
| float | rotation { 0.0F } |
| | The rotation of the object in radians.
|
| |
| int | z_index { 0 } |
| | The layer that the object is on.
|
| |
| bool | active { true } |
| | Whether or not the object is active.
|
| |
| float | alpha { 1.0F } |
| | Opacity of the object.
|
| |
| Physics | body |
| | Physics body of the object.
|
| |
| bool | alive { true } |
| | Alive state.
|
| |
Sprite Object.
Definition at line 109 of file game.h.
◆ draw()
| void asw::game::Sprite::draw |
( |
| ) |
|
|
inlineoverridevirtual |
Draw the sprite to the screen.
If a rotation is set, the sprite will be rotated around its center.
Reimplemented from asw::game::GameObject.
Definition at line 130 of file game.h.
◆ set_texture()
| void asw::game::Sprite::set_texture |
( |
const asw::Texture & | texture, |
|
|
bool | auto_size = true ) |
|
inline |
Set the texture of the sprite.
- Parameters
-
| texture | The texture to set. |
| auto_size | Whether or not to automatically set the size of the sprite based on the texture dimensions. |
Definition at line 117 of file game.h.
◆ texture_
The texture of the sprite.
Definition at line 154 of file game.h.
The documentation for this class was generated from the following file: