![]() |
R-Type
2
Doom but in better
|
Represents an entity in an Entity-Component-System (ECS) architecture. More...
#include <Entity.hpp>
Public Member Functions | |
Entity (std::size_t id) | |
Constructs an Entity with a given ID. | |
operator std::size_t () const | |
Implicit conversion operator to size_t . | |
std::size_t | getID () const |
Retrieves the ID of the entity. | |
Represents an entity in an Entity-Component-System (ECS) architecture.
The Entity
class provides a lightweight wrapper around an entity identifier (ID). It allows entities to be managed as unique IDs within the ECS system.
Definition at line 12 of file Entity.hpp.
|
explicit |
Constructs an Entity
with a given ID.
id | The unique identifier for the entity. |
Definition at line 3 of file Entity.cpp.
std::size_t Entity::getID | ( | ) | const |
Retrieves the ID of the entity.
Definition at line 9 of file Entity.cpp.
Entity::operator std::size_t | ( | ) | const |
Implicit conversion operator to size_t
.
This operator allows an Entity
to be used as its underlying ID in contexts requiring a size_t
.
Definition at line 5 of file Entity.cpp.