Esempio n. 1
0
 public override bool Terminate(object data)
 {
     this.prefabProdEscortShipEvacuation = null;
     if (this._prodEscortShipEvacuation != null)
     {
         this._prodEscortShipEvacuation.Discard();
     }
     this._prodEscortShipEvacuation = null;
     return(false);
 }
 protected override bool UnInit()
 {
     this._prefabEscortShipEvacuation = null;
     if (this._prodEscortShipEvacuation != null)
     {
         this._prodEscortShipEvacuation.Discard();
     }
     this._prodEscortShipEvacuation = null;
     return(true);
 }
Esempio n. 3
0
        public override bool Init(object data)
        {
            BattleManager battleManager = BattleCutManager.GetBattleManager();

            if (battleManager.GetEscapeCandidate() != null)
            {
                this._prodEscortShipEvacuation = ProdEscortShipEvacuation.Instantiate((!(this.prefabProdEscortShipEvacuation != null)) ? PrefabFile.Load <ProdEscortShipEvacuation>(PrefabFileInfos.BattleProdEscortShipEvacuation) : this.prefabProdEscortShipEvacuation.GetComponent <ProdEscortShipEvacuation>(), BattleCutManager.GetSharedPlase(), BattleCutManager.GetKeyControl(), BattleCutManager.GetBattleManager().GetEscapeCandidate(), true);
                this._prodEscortShipEvacuation.Init();
                this._prodEscortShipEvacuation.Play(new DelDecideAdvancingWithdrawalButton(this.DecideAdvancinsWithDrawalBtn));
            }
            else if (battleManager.Ships_f[0].DmgStateEnd == DamageState_Battle.Taiha && ShipUtils.HasRepair(battleManager.Ships_f[0]))
            {
                BattleCutManager.ReqPhase(BattleCutPhase.AdvancingWithdrawalDC);
            }
            else
            {
                BattleCutManager.ReqPhase(BattleCutPhase.AdvancingWithdrawal);
            }
            return(false);
        }
        protected override bool Init()
        {
            BattleManager battleManager = BattleTaskManager.GetBattleManager();

            if (battleManager.GetEscapeCandidate() != null)
            {
                this._prodEscortShipEvacuation = ProdEscortShipEvacuation.Instantiate((!(this._prefabEscortShipEvacuation != null)) ? PrefabFile.Load <ProdEscortShipEvacuation>(PrefabFileInfos.BattleProdEscortShipEvacuation) : this._prefabEscortShipEvacuation.GetComponent <ProdEscortShipEvacuation>(), BattleTaskManager.GetBattleCameras().cutInCamera.get_transform(), BattleTaskManager.GetKeyControl(), BattleTaskManager.GetBattleManager().GetEscapeCandidate(), false);
                this._prodEscortShipEvacuation.Init();
                this._prodEscortShipEvacuation.Play(new DelDecideAdvancingWithdrawalButton(this.DecideAdvancinsWithDrawalBtn));
            }
            else
            {
                if (battleManager.Ships_f[0].DmgStateEnd == DamageState_Battle.Taiha && ShipUtils.HasRepair(battleManager.Ships_f[0]))
                {
                    BattleTaskManager.ReqPhase(BattlePhase.AdvancingWithdrawalDC);
                }
                else
                {
                    BattleTaskManager.ReqPhase(BattlePhase.AdvancingWithdrawal);
                }
                base.ImmediateTermination();
            }
            return(true);
        }