Game 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.
|
| |
Game Object.
Objects
Definition at line 42 of file game.h.
◆ GameObject()
| asw::game::GameObject::GameObject |
( |
| ) |
|
|
default |
◆ ~GameObject()
| virtual asw::game::GameObject::~GameObject |
( |
| ) |
|
|
virtualdefault |
◆ draw()
| virtual void asw::game::GameObject::draw |
( |
| ) |
|
|
inlinevirtual |
◆ get_transform()
| const asw::Quad< float > & asw::game::GameObject::get_transform |
( |
| ) |
const |
|
inline |
Get transform.
- Returns
- The position of the object.
Definition at line 70 of file game.h.
◆ update()
| virtual void asw::game::GameObject::update |
( |
float | dt | ) |
|
|
inlinevirtual |
Update the object.
- Parameters
-
| dt | The time in seconds since the last update. |
Reimplemented in asw::ParticleEmitter.
Definition at line 52 of file game.h.
◆ active
| bool asw::game::GameObject::active { true } |
Whether or not the object is active.
If an object is not active, it will not be updated or drawn.
Definition at line 92 of file game.h.
◆ alive
| bool asw::game::GameObject::alive { true } |
Alive state.
Definition at line 104 of file game.h.
◆ alpha
| float asw::game::GameObject::alpha { 1.0F } |
Opacity of the object.
Definition at line 96 of file game.h.
◆ body
| Physics asw::game::GameObject::body |
◆ rotation
| float asw::game::GameObject::rotation { 0.0F } |
The rotation of the object in radians.
Definition at line 81 of file game.h.
◆ transform
| asw::Quad<float> asw::game::GameObject::transform |
The transform of the object.
Definition at line 77 of file game.h.
◆ z_index
| int asw::game::GameObject::z_index { 0 } |
The layer that the object is on.
Objects on higher layers are drawn on top of objects on lower layers.
Definition at line 87 of file game.h.
The documentation for this class was generated from the following file: