Game Object.
More...
#include <game.h>
|
asw::Quad< float > | transform |
| The transform of the object.
|
|
float | rotation {0} |
| The rotation of the object in degrees.
|
|
int | zIndex {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 37 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 |
◆ getTransform()
const asw::Quad< float > & asw::game::GameObject::getTransform |
( |
| ) |
const |
|
inline |
Get transform.
- Returns
- The position of the object.
Definition at line 62 of file game.h.
◆ update()
virtual void asw::game::GameObject::update |
( |
float | deltaTime | ) |
|
|
inlinevirtual |
◆ 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 81 of file game.h.
◆ alive
bool asw::game::GameObject::alive {true} |
Alive state.
Definition at line 93 of file game.h.
◆ alpha
float asw::game::GameObject::alpha {1.0F} |
Opacity of the object.
Definition at line 85 of file game.h.
◆ body
Physics asw::game::GameObject::body |
◆ rotation
float asw::game::GameObject::rotation {0} |
The rotation of the object in degrees.
Definition at line 70 of file game.h.
◆ transform
asw::Quad<float> asw::game::GameObject::transform |
The transform of the object.
Definition at line 66 of file game.h.
◆ zIndex
int asw::game::GameObject::zIndex {0} |
The layer that the object is on.
Objects on higher layers are drawn on top of objects on lower layers.
Definition at line 76 of file game.h.
The documentation for this class was generated from the following file: