public override bool Init(object data) { BattleManager battleManager = BattleCutManager.GetBattleManager(); if (battleManager.GetEscapeCandidate() != null) { _prodEscortShipEvacuation = ProdEscortShipEvacuation.Instantiate((!(prefabProdEscortShipEvacuation != null)) ? PrefabFile.Load <ProdEscortShipEvacuation>(PrefabFileInfos.BattleProdEscortShipEvacuation) : ((Component)prefabProdEscortShipEvacuation).GetComponent <ProdEscortShipEvacuation>(), BattleCutManager.GetSharedPlase(), BattleCutManager.GetKeyControl(), BattleCutManager.GetBattleManager().GetEscapeCandidate(), isBattleCut: true); _prodEscortShipEvacuation.Init(); _prodEscortShipEvacuation.Play(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) { _prodEscortShipEvacuation = ProdEscortShipEvacuation.Instantiate((!(_prefabEscortShipEvacuation != null)) ? PrefabFile.Load <ProdEscortShipEvacuation>(PrefabFileInfos.BattleProdEscortShipEvacuation) : ((Component)_prefabEscortShipEvacuation).GetComponent <ProdEscortShipEvacuation>(), BattleTaskManager.GetBattleCameras().cutInCamera.transform, BattleTaskManager.GetKeyControl(), BattleTaskManager.GetBattleManager().GetEscapeCandidate(), isBattleCut: false); _prodEscortShipEvacuation.Init(); _prodEscortShipEvacuation.Play(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); } ImmediateTermination(); } return(true); }