public override bool MissionEnded(ref MissionResult missionResult) { bool flag = false; if (this._isEnemySideRetreating || this._isEnemySideDepleted) { missionResult = MissionResult.CreateSuccessful((IMission)this.Mission); flag = true; } else if (this._isPlayerSideDepleted) { missionResult = MissionResult.CreateDefeated((IMission)this.Mission); flag = true; } if (flag) { this._missionAgentSpawnLogic.StopSpawner(); } return(flag); }
public override bool MissionEnded(ref MissionResult missionResult) { if (!this.IsDeploymentFinished) { return(false); } if (this.IsPlayerDead()) { missionResult = MissionResult.CreateDefeated((IMission)this.Mission); return(true); } if (this.Mission.GetMemberCountOfSide(BattleSideEnum.Attacker) == 0) { missionResult = this.Mission.PlayerTeam.Side == BattleSideEnum.Attacker ? MissionResult.CreateDefeated((IMission)this.Mission) : MissionResult.CreateSuccessful((IMission)this.Mission); return(true); } if (this.Mission.GetMemberCountOfSide(BattleSideEnum.Defender) != 0) { return(false); } missionResult = this.Mission.PlayerTeam.Side == BattleSideEnum.Attacker ? MissionResult.CreateSuccessful((IMission)this.Mission) : MissionResult.CreateDefeated((IMission)this.Mission); return(true); }