コード例 #1
0
        public static void SendStatisticsMessage(PlayerEntity targetPlayer)
        {
            BattleStatisticsMessage message = BattleStatisticsMessage.Allocate();

            if (targetPlayer.hasStatisticsData)
            {
                BattleData data = targetPlayer.statisticsData.Battle;

                KillerInfo killer = KillerInfo.Allocate();
                killer.PlayerLv   = data.Killer.PlayerLv;
                killer.PlayerName = data.Killer.PlayerName;
                killer.BackId     = data.Killer.BackId;
                killer.TitleId    = data.Killer.TitleId;
                killer.BadgeId    = data.Killer.BadgeId;
                killer.WeaponId   = data.Killer.WeaponId;
                killer.DeadType   = (int)data.Killer.DeadType;
                message.Killer    = killer;

                foreach (var opponent in data.OpponentList)
                {
                    OpponentInfo info = OpponentInfo.Allocate();
                    info.PlayerLv   = opponent.PlayerLv;
                    info.PlayerName = opponent.PlayerName;
                    info.BackId     = opponent.BackId;
                    info.TitleId    = opponent.TitleId;
                    info.BadgeId    = opponent.BadgeId;
                    info.WeaponId   = opponent.WeaponId;
                    info.IsKill     = opponent.IsKill;
                    info.Damage     = opponent.Damage;
                    message.Opponents.Add(info);
                }
            }

            targetPlayer.network.NetworkChannel.SendReliable((int)EServer2ClientMessage.Statistics, message);
        }
コード例 #2
0
 public CarModelMenuOption(BasicEffect2 effect, OpponentInfo info)
 {
     _effect = effect;
     _info   = info;
 }