コード例 #1
0
 /// <summary>
 /// Method called by the SyncList operation over the Network when its content changes.
 /// This is an implementation for changes to the team score, updating the text values.
 /// Parameters: type of operation, index of team which received updates.
 /// </summary>
 public void OnTeamScoreChanged(UnityEngine.Networking.SyncListInt.Operation op, int index)
 {
     teamScore[index].text = GameManager.GetInstance().score[index].ToString();
     teamScore[index].GetComponent <Animator>().Play("Animation");
 }
コード例 #2
0
 /// <summary>
 /// Method called by the SyncList operation over the Network when its content changes.
 /// This is an implementation for changes to the team fill, updating the slider values.
 /// Parameters: type of operation, index of team which received updates.
 /// </summary>
 public void OnTeamSizeChanged(UnityEngine.Networking.SyncListInt.Operation op, int index)
 {
     teamSize[index].value  = GameManager.GetInstance().size[index];
     playerName[index].text = PlayerPrefs.GetString(PrefsKeys.playerName);
     playerName[index].text = GameManager.GetInstance().names[index];
 }