You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
462 B
C++
32 lines
462 B
C++
#include "entity.h"
|
|
|
|
Entity::Entity(coordinate _x, coordinate _y) :
|
|
pos_x(_x), pos_y(_y)
|
|
{}
|
|
|
|
Entity::~Entity()
|
|
{}
|
|
|
|
/// Get current Entity position
|
|
void Entity::position(coordinate &x, coordinate &y) const noexcept
|
|
{
|
|
x = pos_x;
|
|
y = pos_y;
|
|
}
|
|
|
|
void Entity::setPosition(coordinate x, coordinate y)
|
|
{
|
|
pos_x = x;
|
|
pos_y = y;
|
|
}
|
|
|
|
coordinate Entity::x() const noexcept
|
|
{
|
|
return pos_x;
|
|
}
|
|
|
|
coordinate Entity::y() const noexcept
|
|
{
|
|
return pos_y;
|
|
}
|