private void OnScoreChanged(SyncListNetScore.Operation op, int scoreIndex, NetScore scoreValue) { if (op == SyncList <NetScore> .Operation.OP_ADD) { return; } CGSNetManager.Instance.LocalPlayer.OnChangeScore(scoreIndex); }
// ReSharper disable once MemberCanBeMadeStatic.Local private void OnScoreChanged(SyncList <NetScore> .Operation op, int scoreIndex, NetScore oldScore, NetScore newScore) { if (op == SyncList <NetScore> .Operation.OP_ADD) { return; } CgsNetManager.Instance.LocalPlayer.OnChangeScore(scoreIndex, scoreIndex); }
public void ChangeScore(int scoreIndex, int points) { if (NetworkManager.singleton.isNetworkActive && !isServer) { Debug.LogWarning(NetworkWarningMessage); return; } GameObject owner = scores[scoreIndex].owner; scores[scoreIndex] = new NetScore(owner, points); }
void Awake() { score = GetComponent <NetScore>(); gui = GetComponent <ChatGUI>(); }