Componente de posicion. Usada en NPCs y jugadores.
Más...
#include <position_component.h>
Componente de posicion. Usada en NPCs y jugadores.
◆ PositionComponent()
PositionComponent::PositionComponent |
( |
int |
x, |
|
|
int |
y |
|
) |
| |
Crea un objeto Position Component.
- Parámetros
-
◆ get_x()
int PositionComponent::get_x |
( |
| ) |
|
Devuelve la coordenada X.
- Devuelve
- int
◆ get_y()
int PositionComponent::get_y |
( |
| ) |
|
Devuelve la coordenada Y.
- Devuelve
- int
◆ init()
void PositionComponent::init |
( |
| ) |
|
|
overridevirtual |
Inicializa el componente con lo que necesite, es llamado en el momento de agregarlo a la entity.
Implementa Component.
◆ position_initialized()
bool PositionComponent::position_initialized |
( |
| ) |
|
Indica si ya hubo un set_position.
- Devuelve
- true si ya hubo un set_position.
-
false si no hubo un set_position.
◆ set_position()
void PositionComponent::set_position |
( |
int |
x, |
|
|
int |
y |
|
) |
| |
Setea la posicion.
- Parámetros
-
x | Nueva coordenada X de la posicion. |
y | Nueva coordenada Y de la posicion. |
◆ update()
void PositionComponent::update |
( |
| ) |
|
|
overridevirtual |
Actualiza el componente.
Implementa Component.
La documentación para esta clase fue generada a partir de los siguientes ficheros:
- /home/nicolas/Taller/TP FINAL - ARGENTUM/repo/client/engine/components/position_component.h
- /home/nicolas/Taller/TP FINAL - ARGENTUM/repo/client/engine/components/position_component.cpp