コード例 #1
0
        private void OnScoreChanged(SyncListNetScore.Operation op, int scoreIndex, NetScore scoreValue)
        {
            if (op == SyncList <NetScore> .Operation.OP_ADD)
            {
                return;
            }

            CGSNetManager.Instance.LocalPlayer.OnChangeScore(scoreIndex);
        }
コード例 #2
0
        // 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);
        }
コード例 #3
0
        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);
        }
コード例 #4
0
 void Awake()
 {
     score = GetComponent <NetScore>();
     gui   = GetComponent <ChatGUI>();
 }