private void OnFormationSelected(BattleFormationKinds1 iFormation) { SortieMapTaskManager.GetUIShipCharacter().Hide(null); SortieMapTaskManager.GetUIAreaMapFrame().Hide(); ProdSortieTransitionToBattle prodSortieTransitionToBattle = SortieBattleTaskManager.GetSortieBattlePrefabFile().prodSortieTransitionToBattle; SortieBattleTaskManager.GetTransitionCamera().enabled = true; prodSortieTransitionToBattle.Play(delegate { Hashtable hashtable = new Hashtable(); if (SortieBattleTaskManager.GetMapManager().GetType().Equals(typeof(RebellionMapManager))) { hashtable.Add("rootType", Generics.BattleRootType.Rebellion); hashtable.Add("rebellionMapManager", SortieBattleTaskManager.GetMapManager()); } else { hashtable.Add("rootType", Generics.BattleRootType.SortieMap); hashtable.Add("sortieMapManager", SortieBattleTaskManager.GetMapManager()); } hashtable.Add("formation", iFormation); RetentionData.SetData(hashtable); SortieBattleTaskManager.ReqMode(SortieBattleMode.Battle); }); }
private new void Start() { InitBattleData(); _clsSettingModel = new SettingModel(); _iPhase = (_iPhaseReq = BattlePhase.BattlePhase_BEF); _traStage = base.transform.FindChild("Stage"); _clsBattleShips = new BattleShips(); _clsBattleCameras = new BattleCameras(); _clsBattleHPGauges = new BattleHPGauges(); _clsBattleField = base.transform.GetComponentInChildren <BattleField>(); UICircleHPGauge circleHPGauge = _clsBattlePrefabFile.circleHPGauge; UIBattleNavigation battleNavigation = _clsBattlePrefabFile.battleNavigation; battleNavigation.panel.depth = 100; _clsTorpedoHpGauges = new TorpedoHpGauges(); _clsBattleShips.Init(GetBattleManager()); _clsBattleField.ReqTimeZone(GetStartTimeZone(GetBattleManager().WarType), GetSkyType()); KCV.Utils.SoundUtils.SwitchBGM((BGMFileInfos)GetBattleManager().GetBgmId()); ProdSortieTransitionToBattle psttb = (SortieBattleTaskManager.GetSortieBattlePrefabFile() != null) ? SortieBattleTaskManager.GetSortieBattlePrefabFile().prodSortieTransitionToBattle : ProdSortieTransitionToBattle.Instantiate(Resources.Load <ProdSortieTransitionToBattle>("Prefabs/SortieMap/SortieTransitionToBattle/ProdSortieTransitionToBattle"), _clsBattleCameras.cutInCamera.transform).QuickFadeInInit(); Observable.FromCoroutine((UniRx.IObserver <float> observer) => InitBattle(observer)).Subscribe(delegate(float x) { if (x == 1f) { _iPhase = (_iPhaseReq = BattlePhase.FleetAdvent); Observable.Timer(TimeSpan.FromSeconds(0.30000001192092896)).Subscribe(delegate { _clsBattleField.AlterWaveDirection(FleetType.Friend); psttb.Play(ProdSortieTransitionToBattle.AnimationName.ProdSortieTransitionToBattleFadeIn, delegate { if (SortieBattleTaskManager.GetSortieBattlePrefabFile() != null) { SortieBattleTaskManager.GetSortieBattlePrefabFile().DisposeProdSortieTransitionToBattle(); } else { UnityEngine.Object.Destroy(psttb.gameObject); } if (SortieBattleTaskManager.GetTransitionCamera() != null) { SortieBattleTaskManager.GetTransitionCamera().enabled = false; } Mem.Del(ref psttb); }); }); } }).AddTo(base.gameObject); }
protected override bool Init() { this._clsState = new StatementMachine(); UIAreaMapFrame uIAreaMapFrame = SortieMapTaskManager.GetUIAreaMapFrame(); uIAreaMapFrame.Hide().setOnComplete(delegate { this._uiBattleShutter = BattleShutter.Instantiate(SortieBattleTaskManager.GetSortieBattlePrefabFile().prefabUIBattleShutter.GetComponent <BattleShutter>(), SortieMapTaskManager.GetSharedPlace(), 20); this._uiBattleShutter.Init(BaseShutter.ShutterMode.Open); this._uiBattleShutter.ReqMode(BaseShutter.ShutterMode.Close, delegate { ProdSortieEnd prodSortieEnd = ProdSortieEnd.Instantiate(SortieMapTaskManager.GetPrefabFile().prodSortieEnd.GetComponent <ProdSortieEnd>(), SortieMapTaskManager.GetSharedPlace()); prodSortieEnd.Play(delegate { this._clsState.AddState(new StatementMachine.StatementMachineInitialize(this.InitResult), new StatementMachine.StatementMachineUpdate(this.UpdateResult)); }); }); }); return(true); }