private bool InitWithdrawalSelection(object data)
 {
     _prodWithdrawalDecisionSelection.Play(delegate
     {
         BattleTaskManager.GetPrefabFile().DisposeProdCommandBuffer();
         ObserverActionQueue observerAction = BattleTaskManager.GetObserverAction();
         observerAction.Executions();
         BattleField battleField = BattleTaskManager.GetBattleField();
         battleField.ResetFleetAnchorPosition();
         battleField.enemySeaLevel.SetActive(isActive: true);
         battleField.ReqTimeZone(KCV.Battle.Utils.TimeZone.Night, BattleTaskManager.GetSkyType());
         battleField.AlterWaveDirection(FleetType.Friend, FleetType.Friend);
         battleField.AlterWaveDirection(FleetType.Enemy, FleetType.Enemy);
         BattleShips battleShips = BattleTaskManager.GetBattleShips();
         battleShips.RadarDeployment(isDeploy: false);
         battleShips.SetShipDrawType(FleetType.Enemy, ShipDrawType.Normal);
         battleShips.SetStandingPosition(StandingPositionType.OneRow);
         battleShips.SetLayer(Generics.Layers.ShipGirl);
         BattleCameras battleCameras = BattleTaskManager.GetBattleCameras();
         battleCameras.InitEnemyFieldCameraDefault();
         battleCameras.SetVerticalSplitCameras(isSplit: false);
         if (!battleCameras.isSplit)
         {
             battleCameras.SetSplitCameras(isSplit: true);
         }
         battleCameras.ResetFieldCamSettings(FleetType.Friend);
         battleCameras.ResetFieldCamSettings(FleetType.Enemy);
         battleCameras.fieldDimCameraEnabled(isEnabled: false);
         BattleFieldCamera battleFieldCamera = BattleTaskManager.GetBattleCameras().fieldCameras[0];
         battleFieldCamera.ReqViewMode(CameraActor.ViewMode.Fix);
         battleFieldCamera.SetFixCamera(_dicSplitCameraPos[FleetType.Friend], _dicSplitCameraRot[FleetType.Friend]);
         battleFieldCamera.cullingMask = battleCameras.GetDefaultLayers();
         battleFieldCamera             = BattleTaskManager.GetBattleCameras().fieldCameras[1];
         battleFieldCamera.ReqViewMode(CameraActor.ViewMode.Fix);
         battleFieldCamera.SetFixCamera(_dicSplitCameraPos[FleetType.Enemy], _dicSplitCameraRot[FleetType.Enemy]);
         battleFieldCamera.cullingMask = battleCameras.GetEnemyCamSplitLayers();
         BattleShips battleShips2      = BattleTaskManager.GetBattleShips();
         battleShips2.SetBollboardTarget(isFriend: true, battleCameras.fieldCameras[0].transform);
         battleShips2.SetBollboardTarget(isFriend: false, battleCameras.fieldCameras[1].transform);
         battleShips2.SetTorpedoSalvoWakeAngle(isSet: false);
         BattleCutInEffectCamera cutInEffectCamera = BattleTaskManager.GetBattleCameras().cutInEffectCamera;
         cutInEffectCamera.isCulling = false;
         UITexture component         = ((Component)cutInEffectCamera.transform.FindChild("TorpedoLine/OverlayLine")).GetComponent <UITexture>();
         if (component != null)
         {
             component.alpha = 0f;
         }
         BattleTaskManager.GetTorpedoHpGauges().SetDestroy();
     }, OnDecideWithdrawalButton);
     return(false);
 }
Пример #2
0
        private void Start()
        {
            this.InitBattleData();
            BattleTaskManager._clsSettingModel   = new SettingModel();
            BattleTaskManager._iPhase            = (BattleTaskManager._iPhaseReq = BattlePhase.BattlePhase_BEF);
            BattleTaskManager._traStage          = base.get_transform().FindChild("Stage");
            BattleTaskManager._clsBattleShips    = new BattleShips();
            BattleTaskManager._clsBattleCameras  = new BattleCameras();
            BattleTaskManager._clsBattleHPGauges = new BattleHPGauges();
            BattleTaskManager._clsBattleField    = base.get_transform().GetComponentInChildren <BattleField>();
            UICircleHPGauge    circleHPGauge    = this._clsBattlePrefabFile.circleHPGauge;
            UIBattleNavigation battleNavigation = this._clsBattlePrefabFile.battleNavigation;

            battleNavigation.panel.depth          = 100;
            BattleTaskManager._clsTorpedoHpGauges = new TorpedoHpGauges();
            BattleTaskManager._clsBattleShips.Init(BattleTaskManager.GetBattleManager());
            BattleTaskManager._clsBattleField.ReqTimeZone(this.GetStartTimeZone(BattleTaskManager.GetBattleManager().WarType), BattleTaskManager.GetSkyType());
            KCV.Utils.SoundUtils.SwitchBGM((BGMFileInfos)BattleTaskManager.GetBattleManager().GetBgmId());
            ProdSortieTransitionToBattle psttb = (SortieBattleTaskManager.GetSortieBattlePrefabFile() != null) ? SortieBattleTaskManager.GetSortieBattlePrefabFile().prodSortieTransitionToBattle : ProdSortieTransitionToBattle.Instantiate(Resources.Load <ProdSortieTransitionToBattle>("Prefabs/SortieMap/SortieTransitionToBattle/ProdSortieTransitionToBattle"), BattleTaskManager._clsBattleCameras.cutInCamera.get_transform()).QuickFadeInInit();

            Observable.FromCoroutine <float>((IObserver <float> observer) => this.InitBattle(observer)).Subscribe(delegate(float x)
            {
                if (x == 1f)
                {
                    BattleTaskManager._iPhase = (BattleTaskManager._iPhaseReq = BattlePhase.FleetAdvent);
                    Observable.Timer(TimeSpan.FromSeconds(0.30000001192092896)).Subscribe(delegate(long _)
                    {
                        BattleTaskManager._clsBattleField.AlterWaveDirection(FleetType.Friend);
                        psttb.Play(ProdSortieTransitionToBattle.AnimationName.ProdSortieTransitionToBattleFadeIn, delegate
                        {
                            if (SortieBattleTaskManager.GetSortieBattlePrefabFile() != null)
                            {
                                SortieBattleTaskManager.GetSortieBattlePrefabFile().DisposeProdSortieTransitionToBattle();
                            }
                            else
                            {
                                Object.Destroy(psttb.get_gameObject());
                            }
                            if (SortieBattleTaskManager.GetTransitionCamera() != null)
                            {
                                SortieBattleTaskManager.GetTransitionCamera().set_enabled(false);
                            }
                            Mem.Del <ProdSortieTransitionToBattle>(ref psttb);
                        });
                    });
                }
            }).AddTo(base.get_gameObject());
        }