|
Air-Trap 1.0.0
A multiplayer R-Type clone game engine built with C++23 and ECS architecture
|
Represents an entity in the ECS (Entity-Component-System) architecture. More...
#include <Entity.hpp>
Public Member Functions | |
| constexpr | Entity (std::uint32_t index, std::uint32_t generation) |
| constexpr | Entity (void) |
| constexpr std::uint32_t | index (void) const |
| constexpr std::uint32_t | generation (void) const |
| constexpr auto | operator<=> (const Entity &) const =default |
| constexpr | operator std::uint64_t (void) const noexcept |
| constexpr bool | isNull (void) const noexcept |
Static Public Attributes | |
| static constexpr std::uint32_t | MAX_INDEX |
| static constexpr std::uint64_t | INDEX_MASK = MAX_INDEX |
| static constexpr std::uint64_t | GEN_SHIFT = 32 |
Private Attributes | |
| std::uint64_t | _id |
| The unique identifier for the entity. | |
Friends | |
| struct | std::hash< Entity > |
Represents an entity in the ECS (Entity-Component-System) architecture.
An Entity is represented as a 64-bit identifier combining a 32-bit index and a 32-bit generation counter. It serves as a unique identifier for entities within the ECS framework. Entities are used to associate components and systems in the ECS design pattern. The generation counter allows entity IDs to be recycled safely.
Definition at line 63 of file Entity.hpp.
|
constexpr |
|
constexpr |
|
constexpr |
Referenced by rtp::ecs::Registry::kill().
|
constexpr |
Referenced by rtp::server::EntitySystem::applyWeaponToEntity(), rtp::server::EntitySystem::createEnemyEntity(), rtp::server::EntitySystem::createObstacleEntity(), rtp::server::EntitySystem::createPowerupEntity(), rtp::server::CollisionSystem::despawn(), rtp::server::NetworkSyncSystem::handleDisconnect(), rtp::ecs::Registry::kill(), rtp::server::GameManager::sendEntitySpawnToSessions(), rtp::server::EnemyShootSystem::spawnBullet(), rtp::server::PlayerShootSystem::spawnBullet(), rtp::server::PlayerShootSystem::spawnChargedBullet(), rtp::server::PlayerShootSystem::spawnDebugPowerup(), rtp::server::LevelSystem::spawnEntityForRoom(), rtp::server::BoomerangSystem::update(), rtp::server::CollisionSystem::update(), and rtp::server::PlayerShootSystem::update().
|
constexprnoexcept |
|
constexprnoexcept |
|
constexprdefault |
|
friend |
Definition at line 88 of file Entity.hpp.
|
private |
The unique identifier for the entity.
Definition at line 88 of file Entity.hpp.
Referenced by std::hash< rtp::ecs::Entity >::operator()().
|
staticconstexpr |
Definition at line 68 of file Entity.hpp.
|
staticconstexpr |
Definition at line 67 of file Entity.hpp.
|
staticconstexpr |
Definition at line 65 of file Entity.hpp.
Referenced by rtp::ecs::Registry::spawn().