9 public abstract class TrueSyncBehaviour : MonoBehaviour, ITrueSyncBehaviourGamePlay, ITrueSyncBehaviourCallbacks {
41 if (_tsTransform == null) {
42 _tsTransform = this.GetComponent<TSTransform>();
52 public void SetGameInfo(TSPlayerInfo localOwner,
int numberOfPlayers) {}
virtual void OnSyncedInput()
Get local player data.
TSPlayerInfo owner
Basic info about the owner of this behaviour.
TSPlayerInfo localOwner
Basic info about the local player.
virtual void OnPreSyncedUpdate()
Called before OnSyncedUpdate.
Represents each player's behaviour simulated on every machine connected to the game.
virtual void OnSyncedUpdate()
Game updates goes here.
int numberOfPlayers
Number of players connected to the game.
TSTransform tsTransform
Returns the TSTransform attached.
void SetGameInfo(TSPlayerInfo localOwner, int numberOfPlayers)
It is not called for instances of TrueSyncBehaviour.
virtual void OnGamePaused()
Called when the game has paused.
int ownerIndex
Index of the owner at initial players list.
virtual void OnGameEnded()
Called when the game has ended.
virtual void OnPlayerDisconnection(int playerId)
Callback called when a player get disconnected.
virtual void OnSyncedStart()
Called once when the object becomes active.
virtual void OnGameUnPaused()
Called when the game has unpaused.