|
Aegis2D
Modular C++26 2D game engine for networked games
|
Identity of an entity shared by the server and the clients. More...
#include <aegis2d/ecs/components.hpp>
Static Public Member Functions | |
| static constexpr NetworkId | of (Entity entity) noexcept |
| Network id of a server entity. | |
Public Attributes | |
| Entity::Id | value = 0 |
The server entity's Entity::id(). | |
Friends | |
| constexpr bool | operator== (const NetworkId &, const NetworkId &) noexcept=default |
| Compares the ids. | |
Identity of an entity shared by the server and the clients.
The server simulates the world and gives each replicated entity the id of its own handle; snapshots and events name entities by this id, and each client maps it to its local entity, whose handle is unrelated.
|
inlinestaticconstexprnoexcept |
Network id of a server entity.
| entity | Handle on the server. |
NetworkId{entity.id()}. | Entity::Id aegis2d::ecs::NetworkId::value = 0 |
The server entity's Entity::id().