#include <Position.hpp>
◆ Position() [1/3]
ECS::Position::Position |
( |
short |
x, |
|
|
short |
y |
|
) |
| |
|
explicitnoexcept |
Constructor for the Position component, which takes two short integers as parameters and assigns them to the _x and _y member variables.
- Parameters
-
x | The x coordinate of the position. |
y | The y coordinate of the position. |
◆ Position() [2/3]
ECS::Position::Position |
( |
const Position & |
pos | ) |
|
|
noexcept |
Copy constructor
- Parameters
-
◆ Position() [3/3]
◆ ~Position()
ECS::Position::~Position |
( |
| ) |
|
|
overridedefaultnoexcept |
◆ getPosition_x()
short ECS::Position::getPosition_x |
( |
| ) |
const |
|
noexcept |
It returns the value of the private variable _x.
- Returns
- A constant reference to the private member variable _x.
◆ getPosition_y()
short ECS::Position::getPosition_y |
( |
| ) |
const |
|
noexcept |
It returns the value of the private variable _y.
- Returns
- A reference to the position_x variable.
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ setPosition_x()
void ECS::Position::setPosition_x |
( |
short |
x | ) |
|
|
noexcept |
Sets the x position of the entity.
- Parameters
-
x | The x position of the entity. |
◆ setPosition_y()
void ECS::Position::setPosition_y |
( |
short |
y | ) |
|
|
noexcept |
This function sets the y position of the entity.
- Parameters
-
y | The y position of the entity. |
The documentation for this class was generated from the following files: