Beispiel #1
0
 public MissionMultiplayerFlagDomination(bool isSkirmish)
 {
     this._gameType = isSkirmish ? MissionLobbyComponent.MultiplayerGameType.Skirmish : MissionLobbyComponent.MultiplayerGameType.Captain;
     if (this._gameType != MissionLobbyComponent.MultiplayerGameType.Skirmish)
     {
         return;
     }
     this._moraleMultiplierForEachFlag = 2f;
     this._pointRemovalTimeInSeconds   = 120f;
 }
Beispiel #2
0
 public override void OnBehaviourInitialize()
 {
     base.OnBehaviourInitialize();
     this._scoreboardComponent = Mission.Current.GetMissionBehaviour <MissionScoreboardComponent>();
     this._currentGameType     = MultiplayerOptions.OptionType.NumberOfBotsPerFormation.GetIntValue() > 0 ? MissionLobbyComponent.MultiplayerGameType.Captain : MissionLobbyComponent.MultiplayerGameType.Skirmish;
     this.ResetTeamPowers();
     this._capturePointOwners = new Team[3];
     this.AllCapturePoints    = Mission.Current.MissionObjects.FindAllWithType <FlagCapturePoint>();
     this.RoundComponent.OnPreparationEnded   += new Action(this.OnPreparationEnded);
     NetworkCommunicator.OnPeerComponentAdded += new Action <PeerComponent>(this.OnPeerComponentAdded);
 }
        public static void SetSpawningBehaviorForCurrentGameType(
            MissionLobbyComponent.MultiplayerGameType currentGameType)
        {
            switch (currentGameType)
            {
            case MissionLobbyComponent.MultiplayerGameType.Siege:
                SpawnComponent.SetSiegeSpawningBehaviour();
                break;

            case MissionLobbyComponent.MultiplayerGameType.Captain:
            case MissionLobbyComponent.MultiplayerGameType.Skirmish:
                SpawnComponent.SetFlagDominationSpawningBehaviour();
                break;
            }
        }