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);
 }
Beispiel #2
0
        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);
        }