RavEngine
Loading...
Searching...
No Matches
RavEngine::NetworkManager Class Reference

Public Member Functions

bool isNetworkEntity (ctti_t id) const
 
std::optional< Entity > CreateEntity (ctti_t id, World *world)
 
template<typename T >
constexpr void RegisterNetworkedEntity ()
 
template<typename T >
constexpr void UnregisterNetworkedEntity ()
 
template<typename T >
constexpr bool IsNetworkedIdentityRegistered ()
 
void Spawn (World *source, ctti_t type_id, Entity ent_id, const uuids::uuid &entity_id)
 
void Destroy (const uuids::uuid &entity_id)
 

Static Public Member Functions

static bool IsServer ()
 
static bool IsClient ()
 
static bool IsNetworked ()
 

Public Attributes

std::unique_ptr< NetworkServer > server
 
std::unique_ptr< NetworkClient > client
 

Member Function Documentation

◆ Destroy()

void NetworkManager::Destroy ( const uuids::uuid &  entity_id)

Spawn a networkidentity. For internal use only, called by the world

◆ IsClient()

bool NetworkManager::IsClient ( )
static
Returns
true if there is an active Client running on this instance

◆ IsNetworked()

static bool RavEngine::NetworkManager::IsNetworked ( )
inlinestatic
Returns
true if this game is networked

◆ IsNetworkedIdentityRegistered()

template<typename T >
constexpr bool RavEngine::NetworkManager::IsNetworkedIdentityRegistered ( )
inlineconstexpr
Parameters
idthe identifier for the entity class
Returns
true if a registration for that ID exists

◆ IsServer()

bool NetworkManager::IsServer ( )
static
Returns
true If there is an active Server running on this instance

◆ RegisterNetworkedEntity()

template<typename T >
constexpr void RavEngine::NetworkManager::RegisterNetworkedEntity ( )
inlineconstexpr

Register an entity class as network spawnable.

Parameters
idthe type identifier for the entity

◆ Spawn()

void NetworkManager::Spawn ( World *  source,
ctti_t  type_id,
Entity  ent_id,
const uuids::uuid &  entity_id 
)

Spawn a networkidentity. For internal use only, called by the world

◆ UnregisterNetworkedEntity()

template<typename T >
constexpr void RavEngine::NetworkManager::UnregisterNetworkedEntity ( )
inlineconstexpr

Unregister an entity class as network spawnable.

Parameters
idthe type identifier for the entity

The documentation for this class was generated from the following files: