TrueSync
|
Manages creation of player prefabs and lockstep execution. More...

Static Public Member Functions | |
static void | RunSimulation () |
Run/Unpause the game simulation. | |
static void | PauseSimulation () |
Pauses the game simulation. | |
static void | EndSimulation () |
End the game simulation. | |
static void | UpdateCoroutines () |
Update all coroutines created. | |
static void | SyncedStartCoroutine (IEnumerator coroutine) |
Starts a new coroutine. More... | |
static GameObject | SyncedInstantiate (GameObject prefab) |
Instantiate a new prefab in a deterministic way. More... | |
static GameObject | SyncedInstantiate (GameObject prefab, TSVector position, TSQuaternion rotation) |
Instantiates a new prefab in a deterministic way. More... | |
static GameObject | SyncedInstantiate (GameObject prefab, TSVector2 position, TSQuaternion rotation) |
Instantiates a new prefab in a deterministic way. More... | |
static void | SyncedDestroy (GameObject gameObject) |
Destroys a GameObject in a deterministic way. More... | |
static void | SyncedDisableBehaviour (GameObject gameObject) |
Disables 'OnSyncedInput' and 'OnSyncUpdate' calls to every ITrueSyncBehaviour attached. | |
static void | RegisterITrueSyncBehaviour (ITrueSyncBehaviour trueSyncBehaviour) |
Registers an implementation of ITrueSyncBehaviour to be included in the simulation. More... | |
static void | RegisterIsReadyChecker (TrueSyncIsReady IsReadyChecker) |
Register a TrueSyncIsReady delegate to that returns true if the game can proceed or false otherwise. More... | |
static void | RemovePlayer (int playerId) |
Removes objets related to a provided player. More... | |
static void | CleanUp () |
Clean up references to be collected by gc. | |
Public Attributes | |
GameObject[] | playerPrefabs |
Player prefabs to be instantiated in each machine. | |
TrueSyncConfig | customConfig |
Static Public Attributes | |
static TrueSyncConfig | _TrueSyncGlobalConfig |
static TrueSyncConfig | TrueSyncCustomConfig = null |
Properties | |
static TrueSyncConfig | TrueSyncGlobalConfig [get] |
static FP | DeltaTime [get] |
Returns the deltaTime between two simulation calls. | |
static FP | Time [get] |
Returns the time elapsed since the beginning of the simulation. | |
static int | Ticks [get] |
Returns the number of the last simulated tick. | |
static int | LastSafeTick [get] |
Returns the last safe simulated tick. | |
static TSVector | Gravity [get] |
Returns the simulated gravity. | |
static List< TSPlayerInfo > | Players [get] |
Returns the list of players connected. | |
static TSPlayerInfo | LocalPlayer [get] |
Returns the local player. | |
static TrueSyncConfig | Config [get] |
Returns the active TrueSyncConfig used by the TrueSyncManager. | |
Detailed Description
Manages creation of player prefabs and lockstep execution.
Definition at line 11 of file TrueSyncManager.cs.
Member Function Documentation
|
static |
Register a TrueSyncIsReady delegate to that returns true if the game can proceed or false otherwise.
- Parameters
-
IsReadyChecker A TrueSyncIsReady delegate
Definition at line 659 of file TrueSyncManager.cs.
|
static |
Registers an implementation of ITrueSyncBehaviour to be included in the simulation.
- Parameters
-
trueSyncBehaviour Instance of an ITrueSyncBehaviour
Definition at line 648 of file TrueSyncManager.cs.
|
static |
Removes objets related to a provided player.
- Parameters
-
playerId Target player's id.
Definition at line 670 of file TrueSyncManager.cs.
|
static |
Destroys a GameObject in a deterministic way.
The method DestroyTSRigidBody is called and attached TrueSyncBehaviors are disabled.
- Parameters
-
rigidBody Instance of a TSRigidBody
Definition at line 596 of file TrueSyncManager.cs.
|
static |
Instantiate a new prefab in a deterministic way.
- Parameters
-
prefab GameObject's prefab to instantiate.
Definition at line 459 of file TrueSyncManager.cs.
|
static |
Instantiates a new prefab in a deterministic way.
- Parameters
-
prefab GameObject's prefab to instantiate. position Position to place the new GameObject. rotation Rotation to set in the new GameObject.
Definition at line 470 of file TrueSyncManager.cs.
|
static |
Instantiates a new prefab in a deterministic way.
- Parameters
-
prefab GameObject's prefab to instantiate. position Position to place the new GameObject. rotation Rotation to set in the new GameObject.
Definition at line 585 of file TrueSyncManager.cs.
|
static |
Starts a new coroutine.
- Parameters
-
coroutine An IEnumerator that represents the coroutine.
Definition at line 448 of file TrueSyncManager.cs.
The documentation for this class was generated from the following file:
Generated by
