Objeto renderizable que contiene informacion para las cuatro orientaciones posibles, y los dos estados de movimiento. Más...
#include <actor.h>
Métodos públicos | |
Actor (AnimationPack &animation_pack, visual_info_t visual_info) | |
Crea un objeto Actor. Más... | |
void | set_orientation (direction_t new_direction) |
Establece una nueva orientacion. Más... | |
void | set_move_status (movement_status_t new_movement_status) |
Establece el estado de movimiento. Más... | |
direction_t | get_direction () |
Devuelve la direccion. Más... | |
movement_status_t | get_movement_status () |
Devuelve el estatus de movimiento. Más... | |
void | render (SDL_Rect dest) override |
Renderiza el objecto en pantalla. Más... | |
void | update () override |
Actualiza el objeto. Más... | |
Actor (const Actor &other) | |
Actor & | operator= (const Actor &other) |
![]() | |
RenderizableObject (visual_info_t visual_info) | |
Crea un objeto RenderizableObject. Más... | |
int | get_width () const |
Devuelve el ancho en centesimas de tile. Más... | |
int | get_height () const |
Devuelve el alto en centesimas de tile. Más... | |
virtual int | get_x_offset () const |
Devuelve el offset X total. Más... | |
virtual int | get_y_offset () const |
Devuelve el offset Y total. Más... | |
RenderizableObject (const RenderizableObject &other) | |
RenderizableObject & | operator= (const RenderizableObject &other) |
void | set_visual_info (visual_info_t new_visual_info) |
Setea la informacion visual. Más... | |
void | set_offset (int new_x_offset, int new_y_offset) |
Otros miembros heredados | |
![]() | |
visual_info_t | visual_info |
Objeto renderizable que contiene informacion para las cuatro orientaciones posibles, y los dos estados de movimiento.
Actor::Actor | ( | AnimationPack & | animation_pack, |
visual_info_t | visual_info | ||
) |
Crea un objeto Actor.
animation_pack | Pack de animacion asociado al actor. |
visual_info | Struct de informacion visual. |
direction_t Actor::get_direction | ( | ) |
Devuelve la direccion.
movement_status_t Actor::get_movement_status | ( | ) |
Devuelve el estatus de movimiento.
|
overridevirtual |
Renderiza el objecto en pantalla.
dest | Cuadro donde se va a renderizar el objeto. |
Implementa RenderizableObject.
void Actor::set_move_status | ( | movement_status_t | new_movement_status | ) |
Establece el estado de movimiento.
new_movement_status | Nuevo estado de movimiento. |
void Actor::set_orientation | ( | direction_t | new_direction | ) |
Establece una nueva orientacion.
new_direction | Nueva orientacion del actor. |
|
overridevirtual |
Actualiza el objeto.
Reimplementado de RenderizableObject.