示例#1
0
 private new void Awake()
 {
     _clsInputKey = new KeyControl();
     _clsTasks    = new Tasks();
     _clsTasks.Init();
     base.transform.GetComponentsInChildren <UIRoot>().ForEach(delegate(UIRoot x)
     {
         Util.SetRootContentSize(x, App.SCREEN_RESOLUTION);
     });
     _clsAnimationObserver         = new ObserverActionQueue();
     _clsTaskBossInsert            = new TaskBattleBossInsert();
     _clsTaskDetection             = new TaskBattleDetection();
     _clsTaskCommand               = new TaskBattleCommand();
     _clsTaskAerialCombat          = new TaskBattleAerialCombat();
     _clsTaskAerialCombatSecond    = new TaskBattleAerialCombatSecond();
     _clsTaskSupportingFire        = new TaskBattleSupportingFire();
     _clsTaskOpeningTorpedoSalvo   = new TaskBattleOpeningTorpedoSalvo();
     _clsTaskShelling              = new TaskBattleShelling();
     _clsTaskTorpedoSalvo          = new TaskBattleTorpedoSalvo();
     _clsTaskFlagshipWreck         = new TaskBattleFlagshipWreck();
     _clsTaskEscortShipEvacuation  = new TaskBattleEscortShipEvacuation();
     _clsTaskClearReward           = new TaskBattleClearReward();
     _clsTaskMapOpen               = new TaskBattleMapOpen();
     _clsTaskAdvancingWithdrawal   = new TaskBattleAdvancingWithdrawal(GotoSortieMap);
     _clsTaskAdvancingWithdrawalDC = new TaskBattleAdvancingWithdrawalDC(GotoSortieMap);
     _clsTaskFleetAdvent           = new TaskBattleFleetAdvent();
     _clsTaskWithdrawalDecision    = new TaskBattleWithdrawalDecision();
     _clsTaskNightCombat           = new TaskBattleNightCombat();
     _clsTaskResult = new TaskBattleResult();
     if (SingletonMonoBehaviour <DontDestroyObject> .Instance != null)
     {
         SingletonMonoBehaviour <DontDestroyObject> .Instance.transform.position = Vector3.up * 9999f;
     }
 }
        private void OnDecideWithdrawalButton(UIHexButtonEx btn)
        {
            ObserverActionQueue observerAction = BattleTaskManager.GetObserverAction();

            observerAction.Register(delegate
            {
                Mem.DelComponentSafe(ref _prodWithdrawalDecisionSelection);
            });
            Observable.Timer(TimeSpan.FromSeconds(1.0)).Subscribe(delegate
            {
                if (btn.index == 0)
                {
                    EndPhase(BattlePhase.Result);
                }
                else if (!BattleTaskManager.GetIsSameBGM())
                {
                    KCV.Utils.SoundUtils.StopFadeBGM(0.2f, delegate
                    {
                        BattleTaskManager.GetBattleManager().StartDayToNightBattle();
                        EndPhase(BattlePhase.NightCombat);
                    });
                }
                else
                {
                    BattleTaskManager.GetBattleManager().StartDayToNightBattle();
                    EndPhase(BattlePhase.NightCombat);
                }
            });
        }
示例#3
0
        private void OnNightMessageFinished()
        {
            BattleCutInCamera    cutInCamera = BattleTaskManager.GetBattleCameras().cutInCamera;
            SlotitemModel_Battle touchPlane  = _clsNightCombat.GetTouchPlane(is_friend: true);
            SlotitemModel_Battle touchPlane2 = _clsNightCombat.GetTouchPlane(is_friend: false);

            _prodAerialTouchPlane = ((!(cutInCamera.transform.GetComponentInChildren <ProdAerialTouchPlane>() != null)) ? ProdAerialTouchPlane.Instantiate(Resources.Load <ProdAerialTouchPlane>("Prefabs/Battle/Production/AerialCombat/ProdAerialTouchPlane"), cutInCamera.transform) : cutInCamera.transform.GetComponentInChildren <ProdAerialTouchPlane>());
            _prodAerialTouchPlane.transform.localPosition = Vector3.zero;
            _prodAerialTouchPlane.Init(touchPlane, touchPlane2);
            if (_clsNightCombat.GetRationData() != null)
            {
                ProdCombatRation pcr = ProdCombatRation.Instantiate(((Component)BattleTaskManager.GetPrefabFile().prefabProdCombatRation).GetComponent <ProdCombatRation>(), BattleTaskManager.GetBattleCameras().cutInCamera.transform, _clsNightCombat.GetRationData());
                pcr.SetOnStageReady(delegate
                {
                    if (_prodNightRadarDeployment != null)
                    {
                        _prodNightRadarDeployment.RadarObjectConvergence();
                    }
                    Mem.DelComponentSafe(ref _prodNightRadarDeployment);
                }).Play(delegate
                {
                    _clsState.AddState(InitSearchNFlare, UpdateSearchNFlare);
                });
                ObserverActionQueue observerAction = BattleTaskManager.GetObserverAction();
                observerAction.Register(delegate
                {
                    Mem.DelComponentSafe(ref pcr);
                });
            }
            else
            {
                _clsState.AddState(InitSearchNFlare, UpdateSearchNFlare);
            }
        }
        protected override bool Init()
        {
            BattleTaskManager.GetTorpedoHpGauges().SetDestroy();
            SingletonMonoBehaviour <FadeCamera> .Instance.SetActive(true);

            SingletonMonoBehaviour <FadeCamera> .Instance.FadeOut(0.2f, delegate
            {
                BattleTaskManager.GetBattleCameras().SetFieldCameraEnabled(false);
                KCV.Utils.SoundUtils.StopFadeBGM(0.25f, null);
                ObserverActionQueue observerAction = BattleTaskManager.GetObserverAction();
                observerAction.Executions();
                BattleTaskManager.DestroyUnneccessaryObject2Result();
                Observable.FromCoroutine(new Func <IEnumerator>(BattleUtils.ClearMemory), false).Subscribe(delegate(Unit _)
                {
                    this._clsBattleResult = BattleTaskManager.GetBattleManager().GetBattleResult();
                    BattleCutInEffectCamera cutInEffectCamera = BattleTaskManager.GetBattleCameras().cutInEffectCamera;
                    cutInEffectCamera.glowEffect.set_enabled(false);
                    cutInEffectCamera.isCulling = true;
                    this._prodVeteransReport    = ProdVeteransReport.Instantiate(BattleTaskManager.GetPrefabFile().prefabProdVeteransReport.GetComponent <ProdVeteransReport>(), cutInEffectCamera.get_transform(), this._clsBattleResult);
                    this._clsState = new StatementMachine();
                    this._clsState.AddState(new StatementMachine.StatementMachineInitialize(this.InitProdVeteransReport), new StatementMachine.StatementMachineUpdate(this.UpdateProdVeteransReport));
                });
            });

            return(true);
        }
示例#5
0
        private void _onTorpedoExplosionFinished()
        {
            BattleCutInEffectCamera efcam         = BattleTaskManager.GetBattleCameras().cutInEffectCamera;
            UICircleHPGauge         circleHPGauge = BattleTaskManager.GetPrefabFile().circleHPGauge;

            circleHPGauge.transform.localScaleZero();
            PlayProdDamage(_clsRaigeki, delegate
            {
                efcam.isCulling = true;
                Observable.Timer(TimeSpan.FromSeconds(1.0)).Subscribe(delegate
                {
                    ObserverActionQueue observerAction = BattleTaskManager.GetObserverAction();
                    observerAction.Register(delegate
                    {
                        BattleTaskManager.GetTorpedoHpGauges().Hide();
                    });
                    EndPhase(BattleUtils.NextPhase(BattlePhase.OpeningTorpedoSalvo));
                });
            });
            if (_prodTorpedoSalvoPhase3 != null)
            {
                UnityEngine.Object.Destroy(_prodTorpedoSalvoPhase3.transform.gameObject);
            }
            _prodTorpedoSalvoPhase3 = null;
        }
示例#6
0
        private void OnNightMessageFinished()
        {
            BattleCutInCamera    cutInCamera = BattleTaskManager.GetBattleCameras().cutInCamera;
            SlotitemModel_Battle touchPlane  = this._clsNightCombat.GetTouchPlane(true);
            SlotitemModel_Battle touchPlane2 = this._clsNightCombat.GetTouchPlane(false);

            this._prodAerialTouchPlane = ((!(cutInCamera.get_transform().GetComponentInChildren <ProdAerialTouchPlane>() != null)) ? ProdAerialTouchPlane.Instantiate(Resources.Load <ProdAerialTouchPlane>("Prefabs/Battle/Production/AerialCombat/ProdAerialTouchPlane"), cutInCamera.get_transform()) : cutInCamera.get_transform().GetComponentInChildren <ProdAerialTouchPlane>());
            this._prodAerialTouchPlane.get_transform().set_localPosition(Vector3.get_zero());
            this._prodAerialTouchPlane.Init(touchPlane, touchPlane2);
            if (this._clsNightCombat.GetRationData() != null)
            {
                ProdCombatRation pcr = ProdCombatRation.Instantiate(BattleTaskManager.GetPrefabFile().prefabProdCombatRation.GetComponent <ProdCombatRation>(), BattleTaskManager.GetBattleCameras().cutInCamera.get_transform(), this._clsNightCombat.GetRationData());
                pcr.SetOnStageReady(delegate
                {
                    if (this._prodNightRadarDeployment != null)
                    {
                        this._prodNightRadarDeployment.RadarObjectConvergence();
                    }
                    Mem.DelComponentSafe <ProdNightRadarDeployment>(ref this._prodNightRadarDeployment);
                }).Play(delegate
                {
                    this._clsState.AddState(new StatementMachine.StatementMachineInitialize(this.InitSearchNFlare), new StatementMachine.StatementMachineUpdate(this.UpdateSearchNFlare));
                });
                ObserverActionQueue observerAction = BattleTaskManager.GetObserverAction();
                observerAction.Register(delegate
                {
                    Mem.DelComponentSafe <ProdCombatRation>(ref pcr);
                });
            }
            else
            {
                this._clsState.AddState(new StatementMachine.StatementMachineInitialize(this.InitSearchNFlare), new StatementMachine.StatementMachineUpdate(this.UpdateSearchNFlare));
            }
        }
        protected override bool Init()
        {
            BattleTaskManager.GetTorpedoHpGauges().SetDestroy();
            SingletonMonoBehaviour <FadeCamera> .Instance.SetActive(isActive : true);

            SingletonMonoBehaviour <FadeCamera> .Instance.FadeOut(0.2f, delegate
            {
                BattleTaskManager.GetBattleCameras().SetFieldCameraEnabled(isEnabled: false);
                KCV.Utils.SoundUtils.StopFadeBGM(0.25f, null);
                ObserverActionQueue observerAction = BattleTaskManager.GetObserverAction();
                observerAction.Executions();
                BattleTaskManager.DestroyUnneccessaryObject2Result();
                Observable.FromCoroutine(BattleUtils.ClearMemory).Subscribe(delegate
                {
                    _clsBattleResult = BattleTaskManager.GetBattleManager().GetBattleResult();
                    BattleCutInEffectCamera cutInEffectCamera = BattleTaskManager.GetBattleCameras().cutInEffectCamera;
                    cutInEffectCamera.glowEffect.enabled      = false;
                    cutInEffectCamera.isCulling = true;
                    _prodVeteransReport         = ProdVeteransReport.Instantiate(((Component)BattleTaskManager.GetPrefabFile().prefabProdVeteransReport).GetComponent <ProdVeteransReport>(), cutInEffectCamera.transform, _clsBattleResult);
                    _clsState = new StatementMachine();
                    _clsState.AddState(InitProdVeteransReport, UpdateProdVeteransReport);
                });
            });

            return(true);
        }
示例#8
0
        public virtual void PlayAttack(HougekiModel model, int nCurrentShellingCnt, bool isNextAttack, bool isSkipAttack, Action callback)
        {
            if (model == null)
            {
                Dlg.Call(ref callback);
            }
            BattleTaskManager.GetTorpedoHpGauges().Hide();
            ObserverActionQueue observerAction = BattleTaskManager.GetObserverAction();

            observerAction.Executions();
            this.hougekiModel   = model;
            this._actOnFinished = callback;
            this._isNextAttack  = isNextAttack;
            this._isSkipAttack  = isSkipAttack;
            this.SetDirectionSubjects(this.hougekiModel);
            this._nCurrentAttackCnt = nCurrentShellingCnt;
            BattleShips battleShips = BattleTaskManager.GetBattleShips();

            battleShips.SetStandingPosition(StandingPositionType.OneRow);
            battleShips.SetLayer(Generics.Layers.ShipGirl);
            BattleField battleField = BattleTaskManager.GetBattleField();

            battleField.ResetFleetAnchorPosition();
            this.CorFleetAnchorDifPosition();
            BattleCameras battleCameras = BattleTaskManager.GetBattleCameras();

            battleCameras.SetVerticalSplitCameras(false);
            BattleShips battleShips2 = BattleTaskManager.GetBattleShips();

            battleShips2.SetBollboardTarget(true, battleCameras.fieldCameras.get_Item(0).get_transform());
            battleShips2.SetBollboardTarget(false, battleCameras.fieldCameras.get_Item(1).get_transform());
            battleShips2.SetTorpedoSalvoWakeAngle(false);
            BattleCutInEffectCamera cutInEffectCamera = BattleTaskManager.GetBattleCameras().cutInEffectCamera;
            UITexture component = cutInEffectCamera.get_transform().FindChild("TorpedoLine/OverlayLine").GetComponent <UITexture>();

            if (component != null)
            {
                component.alpha = 0f;
            }
            BattleFieldCamera battleFieldCamera = battleCameras.fieldCameras.get_Item(0);

            battleFieldCamera.clearFlags  = 1;
            battleFieldCamera.cullingMask = BattleTaskManager.GetBattleCameras().GetDefaultLayers();
            battleFieldCamera.eyePosition = this.CalcAttackerCamStartPos;
            battleCameras.SwitchMainCamera(FleetType.Friend);
            BattleFieldCamera battleFieldCamera2 = battleCameras.fieldCameras.get_Item(1);

            battleFieldCamera2.eyePosition = new Vector3(0f, 4f, 0f);
            battleFieldCamera2.eyeRotation = Quaternion.get_identity();
            battleFieldCamera2.fieldOfView = 30f;
            this.SetFieldCamera(true, this.CalcCamPos(true, false), this._listBattleShips.get_Item(0).spPointOfGaze);
            this.SetDimCamera(true, battleFieldCamera.get_transform());
            this.subjectShipLayerFmAnD   = Generics.Layers.FocusDim;
            this.subjectStandingPosFmAnD = StandingPositionType.Advance;
            BattleTaskManager.GetPrefabFile().circleHPGauge.get_transform().localScaleZero();
            this._clsState.AddState(new StatementMachine.StatementMachineInitialize(this.InitAttackerFocus), new StatementMachine.StatementMachineUpdate(this.UpdateAttackerFocus));
        }
        public virtual void PlayAttack(HougekiModel model, int nCurrentShellingCnt, bool isNextAttack, bool isSkipAttack, Action callback)
        {
            if (model == null)
            {
                Dlg.Call(ref callback);
            }
            BattleTaskManager.GetTorpedoHpGauges().Hide();
            ObserverActionQueue observerAction = BattleTaskManager.GetObserverAction();

            observerAction.Executions();
            hougekiModel   = model;
            _actOnFinished = callback;
            _isNextAttack  = isNextAttack;
            _isSkipAttack  = isSkipAttack;
            SetDirectionSubjects(hougekiModel);
            _nCurrentAttackCnt = nCurrentShellingCnt;
            BattleShips battleShips = BattleTaskManager.GetBattleShips();

            battleShips.SetStandingPosition(StandingPositionType.OneRow);
            battleShips.SetLayer(Generics.Layers.ShipGirl);
            BattleField battleField = BattleTaskManager.GetBattleField();

            battleField.ResetFleetAnchorPosition();
            CorFleetAnchorDifPosition();
            BattleCameras battleCameras = BattleTaskManager.GetBattleCameras();

            battleCameras.SetVerticalSplitCameras(isSplit: false);
            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;
            UITexture component = ((Component)cutInEffectCamera.transform.FindChild("TorpedoLine/OverlayLine")).GetComponent <UITexture>();

            if (component != null)
            {
                component.alpha = 0f;
            }
            BattleFieldCamera battleFieldCamera = battleCameras.fieldCameras[0];

            battleFieldCamera.clearFlags  = CameraClearFlags.Skybox;
            battleFieldCamera.cullingMask = BattleTaskManager.GetBattleCameras().GetDefaultLayers();
            battleFieldCamera.eyePosition = CalcAttackerCamStartPos;
            battleCameras.SwitchMainCamera(FleetType.Friend);
            BattleFieldCamera battleFieldCamera2 = battleCameras.fieldCameras[1];

            battleFieldCamera2.eyePosition = new Vector3(0f, 4f, 0f);
            battleFieldCamera2.eyeRotation = Quaternion.identity;
            battleFieldCamera2.fieldOfView = 30f;
            SetFieldCamera(isAttacker: true, CalcCamPos(isAttacker: true, isPointOfGaze: false), _listBattleShips[0].spPointOfGaze);
            SetDimCamera(isAttacker: true, battleFieldCamera.transform);
            subjectShipLayerFmAnD   = Generics.Layers.FocusDim;
            subjectStandingPosFmAnD = StandingPositionType.Advance;
            BattleTaskManager.GetPrefabFile().circleHPGauge.transform.localScaleZero();
            _clsState.AddState(InitAttackerFocus, UpdateAttackerFocus);
        }
示例#10
0
        public bool Reset()
        {
            ObserverActionQueue observerAction = BattleTaskManager.GetObserverAction();

            observerAction.Register(delegate
            {
                BattleTaskManager.GetPrefabFile().circleHPGauge.get_transform().localScaleZero();
            });
            return(true);
        }
 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);
 }
示例#12
0
        private void OnDeathCryFinished()
        {
            ObserverActionQueue observerAction = BattleTaskManager.GetObserverAction();

            observerAction.Register(delegate
            {
                if (_prodNightRadarDeployment != null)
                {
                    _prodNightRadarDeployment.RadarObjectConvergence();
                }
                Mem.DelComponentSafe(ref _prodNightRadarDeployment);
            });
            Observable.Timer(TimeSpan.FromSeconds(1.0)).Subscribe(delegate
            {
                EndPhase(BattleUtils.NextPhase(BattlePhase.NightCombat));
            });
        }
 protected override bool Init()
 {
     _prodBattleCommandSelect = ProdBattleCommandSelect.Instantiate(((Component)BattleTaskManager.GetPrefabFile().prefabProdBattleCommandSelect).GetComponent <ProdBattleCommandSelect>(), BattleTaskManager.GetBattleCameras().cutInCamera.transform, BattleTaskManager.GetBattleManager().GetCommandPhaseModel());
     _clsRationModel          = BattleTaskManager.GetBattleManager().GetRationModel();
     if (_clsRationModel != null)
     {
         _prodCombatRation = ProdCombatRation.Instantiate(((Component)BattleTaskManager.GetPrefabFile().prefabProdCombatRation).GetComponent <ProdCombatRation>(), BattleTaskManager.GetBattleCameras().cutInCamera.transform, _clsRationModel);
         _prodCombatRation.Play(OnCombatRationFinished);
         ObserverActionQueue observerAction = BattleTaskManager.GetObserverAction();
         observerAction.Register(delegate
         {
             Mem.DelComponentSafe(ref _prodCombatRation);
         });
     }
     else
     {
         OnCombatRationFinished();
     }
     return(true);
 }
示例#14
0
        private bool InitSearchNFlare(object data)
        {
            BattleCameras     battleCameras     = BattleTaskManager.GetBattleCameras();
            BattleFieldCamera battleFieldCamera = battleCameras.fieldCameras[0];

            battleFieldCamera.flareLayer.enabled = true;
            bool flag  = (_clsNightCombat.GetSearchLightShip(is_friend: true) != null) ? true : false;
            bool flag2 = (_clsNightCombat.GetFlareShip(is_friend: true) != null) ? true : false;

            if (flag || flag2)
            {
                if (_prodNightRadarDeployment != null)
                {
                    _prodNightRadarDeployment.RadarObjectConvergence();
                }
                Mem.DelComponentSafe(ref _prodNightRadarDeployment);
                ObserverActionQueue observerAction = BattleTaskManager.GetObserverAction();
                observerAction.Executions();
                BattleTaskManager.GetBattleShips().SetStandingPosition(StandingPositionType.OneRow);
                battleFieldCamera.ReqViewMode(CameraActor.ViewMode.Fix);
                battleFieldCamera.transform.position = _vCameraOriginPos;
                battleFieldCamera.transform.rotation = Quaternion.identity;
                ShipModel_BattleAll shipModel_BattleAll = (!flag) ? _clsNightCombat.GetFlareShip(is_friend: true) : _clsNightCombat.GetSearchLightShip(is_friend: true);
                if (shipModel_BattleAll != null)
                {
                    BattleField  battleField  = BattleTaskManager.GetBattleField();
                    UIBattleShip uIBattleShip = BattleTaskManager.GetBattleShips().dicFriendBattleShips[shipModel_BattleAll.Index];
                    Vector3      position     = uIBattleShip.transform.position;
                    float        x            = 0f - position.x;
                    battleField.dicFleetAnchor[FleetType.Friend].transform.AddPosX(x);
                    battleFieldCamera.transform.AddPosX(x);
                }
            }
            SearchLight_FlareBullet_PlayAnimation().Subscribe(delegate
            {
                OnSearchNFlareFinished();
            });
            return(false);
        }
示例#15
0
        private bool InitSearchNFlare(object data)
        {
            BattleCameras     battleCameras     = BattleTaskManager.GetBattleCameras();
            BattleFieldCamera battleFieldCamera = battleCameras.fieldCameras.get_Item(0);

            battleFieldCamera.flareLayer.set_enabled(true);
            bool searchLightShip = this._clsNightCombat.GetSearchLightShip(true) != null;
            bool flareShip       = this._clsNightCombat.GetFlareShip(true) != null;

            if (searchLightShip || flareShip)
            {
                if (this._prodNightRadarDeployment != null)
                {
                    this._prodNightRadarDeployment.RadarObjectConvergence();
                }
                Mem.DelComponentSafe <ProdNightRadarDeployment>(ref this._prodNightRadarDeployment);
                ObserverActionQueue observerAction = BattleTaskManager.GetObserverAction();
                observerAction.Executions();
                BattleTaskManager.GetBattleShips().SetStandingPosition(StandingPositionType.OneRow);
                battleFieldCamera.ReqViewMode(CameraActor.ViewMode.Fix);
                battleFieldCamera.get_transform().set_position(this._vCameraOriginPos);
                battleFieldCamera.get_transform().set_rotation(Quaternion.get_identity());
                ShipModel_BattleAll shipModel_BattleAll = (!searchLightShip) ? this._clsNightCombat.GetFlareShip(true) : this._clsNightCombat.GetSearchLightShip(true);
                if (shipModel_BattleAll != null)
                {
                    BattleField  battleField  = BattleTaskManager.GetBattleField();
                    UIBattleShip uIBattleShip = BattleTaskManager.GetBattleShips().dicFriendBattleShips.get_Item(shipModel_BattleAll.Index);
                    float        x            = -uIBattleShip.get_transform().get_position().x;
                    battleField.dicFleetAnchor.get_Item(FleetType.Friend).get_transform().AddPosX(x);
                    battleFieldCamera.get_transform().AddPosX(x);
                }
            }
            this.SearchLight_FlareBullet_PlayAnimation().Subscribe(delegate(int _)
            {
                this.OnSearchNFlareFinished();
            });
            return(false);
        }