mirror of
https://github.com/zoriya/Bomberman.git
synced 2025-12-21 05:45:10 +00:00
48 lines
829 B
C++
48 lines
829 B
C++
//
|
|
// Created by Zoe Roux on 5/17/21.
|
|
//
|
|
|
|
#include "PositionComponent.hpp"
|
|
|
|
namespace WAL::Components
|
|
{
|
|
PositionComponent::PositionComponent(Entity &entity)
|
|
: Component(entity),
|
|
_position()
|
|
{}
|
|
|
|
PositionComponent::PositionComponent(float x, float y, float z, Entity &entity)
|
|
: Component(entity),
|
|
_position(x, y, z)
|
|
{}
|
|
|
|
Component *PositionComponent::clone(WAL::Entity &entity) const
|
|
{
|
|
return new PositionComponent(entity);
|
|
}
|
|
|
|
Vector3f &PositionComponent::getPosition()
|
|
{
|
|
return this->_position;
|
|
}
|
|
|
|
const Vector3f &PositionComponent::getPosition() const
|
|
{
|
|
return this->_position;
|
|
}
|
|
|
|
float PositionComponent::getX() const
|
|
{
|
|
return this->_position.x;
|
|
}
|
|
|
|
float PositionComponent::getY() const
|
|
{
|
|
return this->_position.y;
|
|
}
|
|
|
|
float PositionComponent::getZ() const
|
|
{
|
|
return this->_position.z;
|
|
}
|
|
} |