示例#1
0
        public void NetSyncScore(int id, int s, int serverId, int killCount, int deadCount, int assistCount)
        {
            if (!score.ContainsKey(id))
            {
                score[id] = new ScoreData();
            }
            score[id].killed      = s;
            score[id].serverId    = serverId;
            score[id].killCount   = killCount;
            score[id].deadCount   = deadCount;
            score[id].assistCount = assistCount;
            scoreUI.SetData(score);

            MyEventSystem.PushEventStatic(MyEvent.EventType.UpdateScoreDetail);
        }
示例#2
0
        public void NetAddScore(int attacker, int enemy)
        {
            if (!score.ContainsKey(attacker))
            {
                score[attacker] = new ScoreData();
            }
            score[attacker].killed++;

            if (!score.ContainsKey(enemy))
            {
                score[enemy] = new ScoreData();
            }
            score[enemy].beKilled++;

            scoreUI.SetData(score);
        }