/// <summary> /// Synces the state the the given state data. /// This sync is done throughout the game. /// </summary> /// <param name="state"></param> public void SyncState(SyncedMatchStateData state) { HasStarted = state.HasStarted; m_ballhandling.PlayerWithBall = state.PlayerWithBall; m_ballhandling.Possession = state.TeamWithPossession; teams[(int)TeamType.HOME].TeamData = state.Teams[(int)TeamType.HOME]; teams[(int)TeamType.AWAY].TeamData = state.Teams[(int)TeamType.AWAY]; }
private void Awake() { m_state = new SyncedMatchStateData(); }
public void SyncMatchState(float lastSync, SyncedMatchStateData state) { GameManager.Singleton.SyncState(state); }