Kanda Players 0.7.0
Loading...
Searching...
No Matches
ContentLoadingWorldAccess Class Reference

Implementation of world access that handles both client and server worlds. Used for offline play and client-hosted sessions where server content must also be managed. More...

+ Inheritance diagram for ContentLoadingWorldAccess:

Public Member Functions

 ContentLoadingWorldAccess (IEntityWorldService worldService)
 Initializes a new instance of world access for content loading management.
 
bool AreWorldsReadyToActivate ()
 Checks if content scenes in both client and server worlds are ready to activate. Content is considered ready when it has finished preloading in all relevant worlds.
 
void ActivateContentInWorlds ()
 Signals content scenes in both client and server worlds to activate.
 
bool AreWorldsContentActive ()
 Checks if content scenes in both client and server worlds have completed activation.
 
bool IsPlayerWaitingForSpawnPoint ()
 Checks if a player is waiting for a spawn point.
 
bool IsPlayerWaitingForSpawnPointInWorld (World world)
 Checks if a player origin is waiting for a spawn point.
 

Detailed Description

Implementation of world access that handles both client and server worlds. Used for offline play and client-hosted sessions where server content must also be managed.

Constructor & Destructor Documentation

◆ ContentLoadingWorldAccess()

ContentLoadingWorldAccess ( IEntityWorldService worldService)
inline

Initializes a new instance of world access for content loading management.

Parameters
worldServiceService to access client and server worlds.

Member Function Documentation

◆ ActivateContentInWorlds()

void ActivateContentInWorlds ( )
inline

Signals content scenes in both client and server worlds to activate.

If either world is null, activation for that world is skipped. This handles scenarios where only client or server world exists.

Implements IContentLoadingWorldAccess.

◆ AreWorldsContentActive()

bool AreWorldsContentActive ( )
inline

Checks if content scenes in both client and server worlds have completed activation.

Returns
True if content is active in all worlds, false if any world is still activating.

A null world is considered active, which handles scenarios where only client or server world exists. Both worlds must either be active or null for this to return true.

Implements IContentLoadingWorldAccess.

◆ AreWorldsReadyToActivate()

bool AreWorldsReadyToActivate ( )
inline

Checks if content scenes in both client and server worlds are ready to activate. Content is considered ready when it has finished preloading in all relevant worlds.

Returns
True if content can be activated in all worlds, false if any world is still preparing.

A null world is considered ready to activate, which handles scenarios where only client or server world exists. Both worlds must either be ready or null for this to return true.

Implements IContentLoadingWorldAccess.

◆ IsPlayerWaitingForSpawnPoint()

bool IsPlayerWaitingForSpawnPoint ( )
inline

Checks if a player is waiting for a spawn point.

Returns
True if player is waiting for spawn point.

We check the client world only for this. If null, we return false.

Implements IContentLoadingWorldAccess.

◆ IsPlayerWaitingForSpawnPointInWorld()

bool IsPlayerWaitingForSpawnPointInWorld ( World world)
inline

Checks if a player origin is waiting for a spawn point.

Parameters
worldThe world to check. Can be null.
Returns
True if there is a player origin waiting for spawn point.

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