Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }