ST_engine
0.3-ALPHA
|
This class represents all static or dynamic objects in the game (excluding text, see ST::text) More...
#include <entity.hpp>
Public Member Functions | |
int32_t | get_col_x () const |
int32_t | get_col_y () const |
int16_t | get_col_y_offset () const |
int16_t | get_col_x_offset () const |
bool | collides (const entity &) const |
void | set_collision_box (int16_t, int16_t, int16_t, int16_t) |
bool | is_active () const |
bool | is_static () const |
bool | is_visible () const |
bool | is_affected_by_physics () const |
void | set_active (bool active) |
void | set_static (bool static_) |
void | set_visible (bool visible) |
void | set_affected_by_physics (bool affected) |
This class represents all static or dynamic objects in the game (excluding text, see ST::text)
Contains all the data for an entity. Texture and animation information, position as well as various other options.
Definition at line 24 of file entity.hpp.
|
inline |
//TODO: Can't move this to the physics manager because of entityCollidesLua(), but it does not belong here. Tells if two entities are colliding or not.
other | Entity to test collision against. |
Definition at line 210 of file entity.hpp.
|
inline |
Get the horizontal length of the collision box.
Definition at line 162 of file entity.hpp.
|
inline |
Get the horizontal offset for the collision box.
Definition at line 178 of file entity.hpp.
|
inline |
Get the vertical length of the collision box.
Definition at line 170 of file entity.hpp.
|
inline |
Get the vertical offset for the collision box.
Definition at line 186 of file entity.hpp.
|
inline |
Set the collision box for the entity, relative to the current position.
offsetX | The horizontal offset for the collision box. |
offsetY | The vertical offset for the collision box. |
X | The horizontal length of the collision box. |
Y | The vertical length of the collision box. |
Definition at line 197 of file entity.hpp.