Beispiel #1
0
 public void OnDuelPreparation(Team duelTeam)
 {
     this.DuelTeam = duelTeam;
     this.RequesterAgent.SetTeam(this.DuelTeam, true);
     this.RequesteeAgent.SetTeam(this.DuelTeam, true);
     this.Timer = MissionTime.Now + MissionTime.Seconds(3f);
 }
Beispiel #2
0
 private void CheckIsEnemySideRetreatingOrOneSideDepleted()
 {
     if (!this._canCheckForEndConditionSiege)
     {
         this._canCheckForEndConditionSiege = this.Mission.GetMissionBehaviour <SiegeDeploymentHandler>() == null;
     }
     else
     {
         if (!this._canCheckForEndCondition)
         {
             return;
         }
         BattleSideEnum side = this.Mission.PlayerTeam.Side;
         this._isPlayerSideDepleted = this._missionAgentSpawnLogic.IsSideDepleted(side);
         this._isEnemySideDepleted  = this._missionAgentSpawnLogic.IsSideDepleted(side.GetOppositeSide());
         if (this._isEnemySideDepleted || this._isPlayerSideDepleted || this.Mission.GetMissionBehaviour <HideoutPhasedMissionController>() != null)
         {
             return;
         }
         bool flag = true;
         foreach (Team team in (ReadOnlyCollection <Team>) this.Mission.Teams)
         {
             if (team.IsEnemyOf(this.Mission.PlayerTeam))
             {
                 foreach (Agent activeAgent in team.ActiveAgents)
                 {
                     if (!activeAgent.IsRunningAway)
                     {
                         flag = false;
                         break;
                     }
                 }
             }
         }
         if (!flag)
         {
             this._enemiesNotYetRetreatingTime = MissionTime.Now;
         }
         if ((double)this._enemiesNotYetRetreatingTime.ElapsedSeconds <= 3.0)
         {
             return;
         }
         this._isEnemySideRetreating = true;
     }
 }
Beispiel #3
0
 public DuelInfo(Agent requesterAgent, Agent requesteeAgent)
 {
     this.RequesterAgent = requesterAgent;
     this.RequesteeAgent = requesteeAgent;
     this.Timer          = MissionTime.Now + MissionTime.Seconds(3.5f);
 }