Beispiel #1
0
 public BehaviorSergeantMPRanged(Formation formation)
     : base(formation)
 {
     this._flagpositions          = Mission.Current.ActiveMissionObjects.FindAllWithType <FlagCapturePoint>().ToList <FlagCapturePoint>();
     this._flagDominationGameMode = Mission.Current.GetMissionBehaviour <MissionMultiplayerFlagDomination>();
     this.CalculateCurrentOrder();
 }
Beispiel #2
0
        public static void SetWinnerTeam(int winnerTeamNo)
        {
            Mission current = Mission.Current;
            MissionMultiplayerFlagDomination missionBehaviour = current.GetMissionBehaviour <MissionMultiplayerFlagDomination>();

            if (missionBehaviour == null)
            {
                return;
            }
            foreach (NetworkCommunicator networkPeer in GameNetwork.NetworkPeers)
            {
                MissionPeer component = networkPeer.GetComponent <MissionPeer>();
                missionBehaviour.ChangeCurrentGoldForPeer(component, 0);
            }
            for (int index = current.Agents.Count - 1; index >= 0; --index)
            {
                Agent agent = current.Agents[index];
                if (agent.IsHuman && agent.Team.MBTeam.Index != winnerTeamNo + 1)
                {
                    Mission.Current.KillAgentCheat(agent);
                }
            }
        }