コード例 #1
0
 /// <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];
 }
コード例 #2
0
 private void Awake()
 {
     m_state = new SyncedMatchStateData();
 }
コード例 #3
0
 public void SyncMatchState(float lastSync, SyncedMatchStateData state)
 {
     GameManager.Singleton.SyncState(state);
 }