예제 #1
0
        private bool _initAircraftCombatPhase2(object data)
        {
            BattleCutInCamera              cutInCamera          = BattleTaskManager.GetBattleCameras().cutInCamera;
            BattleCutInCamera              cutInCamera2         = BattleTaskManager.GetBattleCameras().cutInCamera;
            BattleCutInEffectCamera        cutInEffectCamera    = BattleTaskManager.GetBattleCameras().cutInEffectCamera;
            Dictionary <int, UIBattleShip> dicFriendBattleShips = BattleTaskManager.GetBattleShips().dicFriendBattleShips;
            Dictionary <int, UIBattleShip> dicEnemyBattleShips  = BattleTaskManager.GetBattleShips().dicEnemyBattleShips;

            this._prodAerialCombatP2.get_gameObject().SetActive(true);
            Object.Destroy(this._prodAerialCombatP1.get_gameObject());
            cutInCamera.cullingMask       = (Generics.Layers.UI2D | Generics.Layers.CutIn);
            cutInEffectCamera.cullingMask = Generics.Layers.CutIn;
            cutInCamera.depth             = 5f;
            cutInEffectCamera.depth       = 4f;
            cutInEffectCamera.glowEffect.set_enabled(true);
            BattleTaskManager.GetBattleCameras().SetSplitCameras2D(false);
            SlotitemModel_Battle touchPlane  = this._clsKoukuu1.GetTouchPlane(true);
            SlotitemModel_Battle touchPlane2 = this._clsKoukuu1.GetTouchPlane(false);

            this._prodAerialTouchPlane = ProdAerialTouchPlane.Instantiate(Resources.Load <ProdAerialTouchPlane>("Prefabs/Battle/Production/AerialCombat/ProdAerialTouchPlane"), cutInCamera2.get_transform());
            this._prodAerialTouchPlane.get_transform().set_localPosition(Vector3.get_zero());
            this._prodAerialTouchPlane.Init(touchPlane, touchPlane2);
            this._prodAerialCombatP2.Play(new Action(this._onAircraftCombatFinished), dicFriendBattleShips, dicEnemyBattleShips);
            return(false);
        }
        private bool _initAircraftSecond(object data)
        {
            BattleCameras     battleCameras = BattleTaskManager.GetBattleCameras();
            BattleCutInCamera cutInCamera   = battleCameras.cutInCamera;

            cutInCamera.isCulling = true;
            BattleCutInEffectCamera cutInEffectCamera = BattleTaskManager.GetBattleCameras().cutInEffectCamera;

            cutInEffectCamera.isCulling = true;
            CutInType cutInType = (_clsKoukuu2.GetCaptainShip(is_friend: true) != null && _clsKoukuu2.GetCaptainShip(is_friend: false) != null) ? CutInType.Both : ((_clsKoukuu2.GetCaptainShip(is_friend: true) == null) ? CutInType.EnemyOnly : CutInType.FriendOnly);

            if (cutInType == CutInType.Both)
            {
                battleCameras.SetSplitCameras2D(isSplit: true);
                cutInCamera.isCulling       = true;
                cutInEffectCamera.isCulling = true;
            }
            else
            {
                if (cutInType == CutInType.FriendOnly)
                {
                    cutInEffectCamera.isCulling = false;
                }
                battleCameras.SetSplitCameras2D(isSplit: false);
            }
            _prodAerialSecondP1.gameObject.SetActive(true);
            _prodAerialSecondP1.Play(_onAerialSecondPhase1Finished);
            return(false);
        }
예제 #3
0
        private bool _initAircraftCombat(object data)
        {
            BattleCameras     battleCameras = BattleTaskManager.GetBattleCameras();
            BattleCutInCamera cutInCamera   = battleCameras.cutInCamera;

            cutInCamera.isCulling = true;
            BattleCutInEffectCamera cutInEffectCamera = BattleTaskManager.GetBattleCameras().cutInEffectCamera;

            cutInEffectCamera.isCulling = true;
            if (_prodAerialCutinP._cutinPhaseCheck())
            {
                battleCameras.SetSplitCameras2D(isSplit: true);
            }
            if (_prodAerialCutinP._chkCutInType() == CutInType.Both)
            {
                cutInCamera.isCulling       = true;
                cutInEffectCamera.isCulling = true;
            }
            else if (_prodAerialCutinP._chkCutInType() == CutInType.FriendOnly)
            {
                cutInEffectCamera.isCulling = false;
            }
            Object.Destroy(_prodAerialCutinP.gameObject);
            _prodAerialCombatP1.gameObject.SetActive(true);
            _prodAerialCombatP1.Play(_onAerialCombatPhase1Finished);
            return(false);
        }
예제 #4
0
        private void OnCommandBufferFinished()
        {
            BattleCutInCamera cutInCamera = BattleTaskManager.GetBattleCameras().cutInCamera;

            cutInCamera.eventMask = (Generics.Layers.UI2D | Generics.Layers.CutIn);
            BattleTaskManager.ReqPhase(BattleUtils.NextPhase(BattlePhase.Command));
        }
예제 #5
0
        private IEnumerator CreateAerialCombatCutIn(IObserver <bool> observer)
        {
            BattleCameras           cams         = BattleTaskManager.GetBattleCameras();
            BattleCutInCamera       inCam        = BattleTaskManager.GetBattleCameras().cutInCamera;
            BattleCutInEffectCamera efCam        = BattleTaskManager.GetBattleCameras().cutInEffectCamera;
            BattleShips             _battleShips = BattleTaskManager.GetBattleShips();

            _prodSupportAerialPhase1 = ProdSupportAerialPhase1.Instantiate(fShips: _battleShips.dicFriendBattleShips, eShips: _battleShips.dicEnemyBattleShips, prefab: Resources.Load <ProdSupportAerialPhase1>("Prefabs/Battle/Production/SupportingFire/ProdSupportAerialPhase1"), model: _clsAerial, parent: cams.cutInCamera.transform.parent);
            if (_clsAerial.GetPlanes(is_friend: true) != null && _clsAerial.GetPlanes(is_friend: false) != null)
            {
                inCam.isCulling = true;
                efCam.isCulling = true;
            }
            else if (_clsAerial.GetPlanes(is_friend: true) != null)
            {
                efCam.isCulling = false;
            }
            yield return(new WaitForEndOfFrame());

            _prodSupportAerialPhase2 = ProdSupportAerialPhase2.Instantiate(Resources.Load <ProdSupportAerialPhase2>("Prefabs/Battle/Production/SupportingFire/ProdSupportAerialPhase2"), _clsAerial, inCam.transform);
            yield return(new WaitForEndOfFrame());

            _prodSupportAerialPhase2.CreateHpGauge(FleetType.Enemy);
            yield return(new WaitForEndOfFrame());

            observer.OnNext(value: true);
            observer.OnCompleted();
        }
예제 #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));
            }
        }
예제 #7
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);
            }
        }
예제 #8
0
        private bool _initAerialSecondCutIn(object data)
        {
            BattleCameras     battleCameras = BattleTaskManager.GetBattleCameras();
            BattleCutInCamera cutInCamera   = battleCameras.cutInCamera;

            cutInCamera.isCulling = true;
            CutInType iType;

            if (this._clsKoukuu2.GetCaptainShip(true) != null && this._clsKoukuu2.GetCaptainShip(false) != null)
            {
                iType = CutInType.Both;
            }
            else if (this._clsKoukuu2.GetCaptainShip(true) != null)
            {
                iType = CutInType.FriendOnly;
            }
            else
            {
                iType = CutInType.EnemyOnly;
            }
            this._prodAerialSecondP1 = ProdAerialCombatP1.Instantiate(PrefabFile.Load <ProdAerialCombatP1>(PrefabFileInfos.BattleProdAerialCombatP1), this._clsKoukuu2, cutInCamera.get_transform().get_parent(), iType);
            this._prodAerialSecondP1.get_gameObject().SetActive(false);
            this._prodAerialSecondP2 = ProdAerialCombatP2.Instantiate(PrefabFile.Load <ProdAerialCombatP2>(PrefabFileInfos.BattleProdAerialCombatP2), this._clsKoukuu2, cutInCamera.get_transform());
            this._prodAerialSecondP2.CreateHpGauge(FleetType.Friend);
            this._prodAerialSecondP2.get_gameObject().SetActive(false);
            this._onAerialSecondCutInFinished();
            return(false);
        }
예제 #9
0
 public BattleCameras()
 {
     _camCutInCamera                   = GameObject.Find("UIRoot/CutInCamera").GetComponent <BattleCutInCamera>();
     _camCutInCamera.cullingMask       = (Generics.Layers.UI2D | Generics.Layers.CutIn);
     _camCutInCamera.depth             = 6f;
     _camCutInCamera.clearFlags        = CameraClearFlags.Depth;
     _camCutInEffectCamera             = GameObject.Find("UIRoot/CutInEffectCamera").GetComponent <BattleCutInEffectCamera>();
     _camCutInEffectCamera.cullingMask = Generics.Layers.CutIn;
     _camCutInEffectCamera.isCulling   = false;
     _camCutInEffectCamera.depth       = 5f;
     _camCutInEffectCamera.clearFlags  = CameraClearFlags.Depth;
     _listCameras = new List <BattleFieldCamera>();
     foreach (int value in Enum.GetValues(typeof(FleetType)))
     {
         if (value != 2)
         {
             BattleFieldCamera item = (!GameObject.Find($"Stage/{(FleetType)value}FieldCamera")) ? null : GameObject.Find($"Stage/{(FleetType)value}FieldCamera").GetComponent <BattleFieldCamera>();
             _listCameras.Add(item);
             if (_listCameras[value] != null)
             {
                 _listCameras[value].cullingMask = GetDefaultLayers();
                 _listCameras[value].ResetMotionBlur();
                 _listCameras[value].depth = 0f;
             }
         }
     }
     _camFieldDimCamera             = BattleFieldDimCamera.Instantiate(((Component)BattleTaskManager.GetPrefabFile().prefabFieldDimCamera).GetComponent <BattleFieldDimCamera>(), BattleTaskManager.GetStage());
     _camFieldDimCamera.syncTarget  = _listCameras[0].transform;
     _camFieldDimCamera.cullingMask = GetDefaultDimLayers();
     _camFieldDimCamera.isCulling   = false;
     _camFieldDimCamera.depth       = -1f;
 }
예제 #10
0
        private void OnCommandBufferFinished2Withdrawal()
        {
            BattleCutInCamera cutInCamera = BattleTaskManager.GetBattleCameras().cutInCamera;

            cutInCamera.eventMask = (Generics.Layers.UI2D | Generics.Layers.CutIn);
            BattleTaskManager.ReqPhase(BattlePhase.WithdrawalDecision);
        }
예제 #11
0
        private IEnumerator CreateAerialCombatCutIn(IObserver <bool> observer)
        {
            BattleCameras     cams = BattleTaskManager.GetBattleCameras();
            BattleCutInCamera cam  = cams.cutInCamera;

            cam.isCulling     = true;
            _prodAerialCutinP = ProdAerialCombatCutinP.Instantiate(((Component)BattleTaskManager.GetPrefabFile().prefabProdAerialCombatCutinP).GetComponent <ProdAerialCombatCutinP>(), _clsKoukuu, cam.transform);
            yield return(new WaitForEndOfFrame());

            _prodAerialCombatP1 = ProdAerialCombatP1.Instantiate(((Component)BattleTaskManager.GetPrefabFile().prefabProdAerialCombatP1).GetComponent <ProdAerialCombatP1>(), _clsKoukuu, cam.transform.parent, _prodAerialCutinP._chkCutInType());
            _prodAerialCombatP1.gameObject.SetActive(false);
            yield return(new WaitForEndOfFrame());

            _prodAerialCombatP2 = ProdAerialCombatP2.Instantiate(PrefabFile.Load <ProdAerialCombatP2>(PrefabFileInfos.BattleProdAerialCombatP2), _clsKoukuu, cam.transform);
            _prodAerialCombatP2.gameObject.SetActive(false);
            yield return(new WaitForEndOfFrame());

            _prodAerialCombatP2.CreateHpGauge(FleetType.Friend);
            yield return(new WaitForEndOfFrame());

            _prodAerialTouchPlane = ProdAerialTouchPlane.Instantiate(Resources.Load <ProdAerialTouchPlane>("Prefabs/Battle/Production/AerialCombat/ProdAerialTouchPlane"), cam.transform);
            _prodAerialTouchPlane.transform.localPosition = Vector3.zero;
            _prodAerialTouchPlane.SetActive(isActive: false);
            observer.OnNext(value: true);
            observer.OnCompleted();
        }
        private bool _initAerialSecondCutIn(object data)
        {
            BattleCameras     battleCameras = BattleTaskManager.GetBattleCameras();
            BattleCutInCamera cutInCamera   = battleCameras.cutInCamera;

            cutInCamera.isCulling = true;
            _prodAerialSecondP1   = ProdAerialCombatP1.Instantiate(iType: (_clsKoukuu2.GetCaptainShip(is_friend: true) != null && _clsKoukuu2.GetCaptainShip(is_friend: false) != null) ? CutInType.Both : ((_clsKoukuu2.GetCaptainShip(is_friend: true) == null) ? CutInType.EnemyOnly : CutInType.FriendOnly), prefab: PrefabFile.Load <ProdAerialCombatP1>(PrefabFileInfos.BattleProdAerialCombatP1), model: _clsKoukuu2, parent: cutInCamera.transform.parent);
            _prodAerialSecondP1.gameObject.SetActive(false);
            _prodAerialSecondP2 = ProdAerialCombatP2.Instantiate(PrefabFile.Load <ProdAerialCombatP2>(PrefabFileInfos.BattleProdAerialCombatP2), _clsKoukuu2, cutInCamera.transform);
            _prodAerialSecondP2.CreateHpGauge(FleetType.Friend);
            _prodAerialSecondP2.gameObject.SetActive(false);
            _onAerialSecondCutInFinished();
            return(false);
        }
예제 #13
0
        private bool _initAerialCombatCutIn(object data)
        {
            BattleCameras     battleCameras = BattleTaskManager.GetBattleCameras();
            BattleCutInCamera cutInCamera   = battleCameras.cutInCamera;

            cutInCamera.isCulling    = true;
            this._prodAerialCutinP   = ProdAerialSecondCutIn.Instantiate(PrefabFile.Load <ProdAerialSecondCutIn>(PrefabFileInfos.BattleProdAerialSecondCutIn), this._clsKoukuu1, cutInCamera.get_transform());
            this._prodAerialCombatP1 = ProdAerialCombatP1.Instantiate(PrefabFile.Load <ProdAerialCombatP1>(PrefabFileInfos.BattleProdAerialCombatP1), this._clsKoukuu1, cutInCamera.get_transform().get_parent(), this._prodAerialCutinP._chkCutInType());
            this._prodAerialCombatP1.get_gameObject().SetActive(false);
            this._prodAerialCombatP2 = ProdAerialCombatP2.Instantiate(PrefabFile.Load <ProdAerialCombatP2>(PrefabFileInfos.BattleProdAerialCombatP2), this._clsKoukuu1, cutInCamera.get_transform());
            this._prodAerialCombatP2.CreateHpGauge(FleetType.Friend);
            this._prodAerialCombatP2.get_gameObject().SetActive(false);
            this._prodAerialCutinP.Play(new Action(this._onAerialCombatCutInFinished));
            return(false);
        }
예제 #14
0
        private bool _initSupportAerialPhase2(object data)
        {
            BattleCutInCamera              cutInCamera         = BattleTaskManager.GetBattleCameras().cutInCamera;
            BattleCutInCamera              cutInCamera2        = BattleTaskManager.GetBattleCameras().cutInCamera;
            BattleCutInEffectCamera        cutInEffectCamera   = BattleTaskManager.GetBattleCameras().cutInEffectCamera;
            Dictionary <int, UIBattleShip> dicFriendBattleShip = BattleTaskManager.GetBattleShips().dicFriendBattleShips;
            Dictionary <int, UIBattleShip> dicEnemyBattleShip  = BattleTaskManager.GetBattleShips().dicEnemyBattleShips;

            Object.Destroy(_prodSupportAerialPhase1.gameObject);
            cutInCamera.cullingMask              = (Generics.Layers.UI2D | Generics.Layers.CutIn);
            cutInEffectCamera.cullingMask        = Generics.Layers.CutIn;
            cutInCamera.depth                    = 5f;
            cutInEffectCamera.depth              = 4f;
            cutInEffectCamera.glowEffect.enabled = true;
            BattleTaskManager.GetBattleCameras().SetSplitCameras2D(isSplit: false);
            _prodSupportAerialPhase2.Play(_onSupportAerialFinishedPhase2);
            return(false);
        }
예제 #15
0
        private bool _initAircraftSecondPhase2(object data)
        {
            BattleCutInCamera              cutInCamera          = BattleTaskManager.GetBattleCameras().cutInCamera;
            BattleCutInCamera              cutInCamera2         = BattleTaskManager.GetBattleCameras().cutInCamera;
            BattleCutInEffectCamera        cutInEffectCamera    = BattleTaskManager.GetBattleCameras().cutInEffectCamera;
            Dictionary <int, UIBattleShip> dicFriendBattleShips = BattleTaskManager.GetBattleShips().dicFriendBattleShips;
            Dictionary <int, UIBattleShip> dicEnemyBattleShips  = BattleTaskManager.GetBattleShips().dicEnemyBattleShips;

            this._prodAerialSecondP2.get_gameObject().SetActive(true);
            Object.Destroy(this._prodAerialSecondP1.get_gameObject());
            cutInCamera.cullingMask       = (Generics.Layers.UI2D | Generics.Layers.CutIn);
            cutInEffectCamera.cullingMask = Generics.Layers.CutIn;
            cutInCamera.depth             = 5f;
            cutInEffectCamera.depth       = 4f;
            cutInEffectCamera.glowEffect.set_enabled(true);
            BattleTaskManager.GetBattleCameras().SetSplitCameras2D(false);
            this._prodAerialSecondP2.Play(new Action(this._onAircraftSecondFinished), dicFriendBattleShips, dicEnemyBattleShips);
            return(false);
        }
예제 #16
0
        private bool _initAircraftSecond(object data)
        {
            BattleCameras     battleCameras = BattleTaskManager.GetBattleCameras();
            BattleCutInCamera cutInCamera   = battleCameras.cutInCamera;

            cutInCamera.isCulling = true;
            BattleCutInEffectCamera cutInEffectCamera = BattleTaskManager.GetBattleCameras().cutInEffectCamera;

            cutInEffectCamera.isCulling = true;
            CutInType cutInType;

            if (this._clsKoukuu2.GetCaptainShip(true) != null && this._clsKoukuu2.GetCaptainShip(false) != null)
            {
                cutInType = CutInType.Both;
            }
            else if (this._clsKoukuu2.GetCaptainShip(true) != null)
            {
                cutInType = CutInType.FriendOnly;
            }
            else
            {
                cutInType = CutInType.EnemyOnly;
            }
            if (cutInType == CutInType.Both)
            {
                battleCameras.SetSplitCameras2D(true);
                cutInCamera.isCulling       = true;
                cutInEffectCamera.isCulling = true;
            }
            else
            {
                if (cutInType == CutInType.FriendOnly)
                {
                    cutInEffectCamera.isCulling = false;
                }
                battleCameras.SetSplitCameras2D(false);
            }
            this._prodAerialSecondP1.get_gameObject().SetActive(true);
            this._prodAerialSecondP1.Play(new Action(this._onAerialSecondPhase1Finished));
            return(false);
        }
 public BattleCameras()
 {
     this._camCutInCamera                   = GameObject.Find("UIRoot/CutInCamera").GetComponent <BattleCutInCamera>();
     this._camCutInCamera.cullingMask       = (Generics.Layers.UI2D | Generics.Layers.CutIn);
     this._camCutInCamera.depth             = 6f;
     this._camCutInCamera.clearFlags        = 3;
     this._camCutInEffectCamera             = GameObject.Find("UIRoot/CutInEffectCamera").GetComponent <BattleCutInEffectCamera>();
     this._camCutInEffectCamera.cullingMask = Generics.Layers.CutIn;
     this._camCutInEffectCamera.isCulling   = false;
     this._camCutInEffectCamera.depth       = 5f;
     this._camCutInEffectCamera.clearFlags  = 3;
     this._listCameras = new List <BattleFieldCamera>();
     using (IEnumerator enumerator = Enum.GetValues(typeof(FleetType)).GetEnumerator())
     {
         while (enumerator.MoveNext())
         {
             FleetType fleetType = (FleetType)((int)enumerator.get_Current());
             if (fleetType != FleetType.CombinedFleet)
             {
                 BattleFieldCamera battleFieldCamera = (!GameObject.Find(string.Format("Stage/{0}FieldCamera", fleetType))) ? null : GameObject.Find(string.Format("Stage/{0}FieldCamera", fleetType)).GetComponent <BattleFieldCamera>();
                 this._listCameras.Add(battleFieldCamera);
                 if (this._listCameras.get_Item((int)fleetType) != null)
                 {
                     this._listCameras.get_Item((int)fleetType).cullingMask = this.GetDefaultLayers();
                     this._listCameras.get_Item((int)fleetType).ResetMotionBlur();
                     this._listCameras.get_Item((int)fleetType).depth = 0f;
                 }
             }
         }
     }
     this._camFieldDimCamera             = BattleFieldDimCamera.Instantiate(BattleTaskManager.GetPrefabFile().prefabFieldDimCamera.GetComponent <BattleFieldDimCamera>(), BattleTaskManager.GetStage());
     this._camFieldDimCamera.syncTarget  = this._listCameras.get_Item(0).get_transform();
     this._camFieldDimCamera.cullingMask = this.GetDefaultDimLayers();
     this._camFieldDimCamera.isCulling   = false;
     this._camFieldDimCamera.depth       = -1f;
 }
예제 #18
0
        private bool _initAircraftCombatPhase2(object data)
        {
            BattleCutInCamera              cutInCamera          = BattleTaskManager.GetBattleCameras().cutInCamera;
            BattleCutInCamera              cutInCamera2         = BattleTaskManager.GetBattleCameras().cutInCamera;
            BattleCutInEffectCamera        cutInEffectCamera    = BattleTaskManager.GetBattleCameras().cutInEffectCamera;
            Dictionary <int, UIBattleShip> dicFriendBattleShips = BattleTaskManager.GetBattleShips().dicFriendBattleShips;
            Dictionary <int, UIBattleShip> dicEnemyBattleShips  = BattleTaskManager.GetBattleShips().dicEnemyBattleShips;

            _prodAerialCombatP2.gameObject.SetActive(true);
            cutInCamera.cullingMask              = (Generics.Layers.UI2D | Generics.Layers.CutIn);
            cutInEffectCamera.cullingMask        = Generics.Layers.CutIn;
            cutInCamera.depth                    = 5f;
            cutInEffectCamera.depth              = 4f;
            cutInEffectCamera.glowEffect.enabled = true;
            BattleTaskManager.GetBattleCameras().SetSplitCameras2D(isSplit: false);
            SlotitemModel_Battle touchPlane  = _clsKoukuu.GetTouchPlane(is_friend: true);
            SlotitemModel_Battle touchPlane2 = _clsKoukuu.GetTouchPlane(is_friend: false);

            _prodAerialTouchPlane.SetActive(isActive: true);
            _prodAerialTouchPlane.Init(touchPlane, touchPlane2);
            _prodAerialCombatP2.Play(_onAircraftCombatFinished, dicFriendBattleShips, dicEnemyBattleShips);
            Object.Destroy(_prodAerialCombatP1.gameObject);
            return(false);
        }
예제 #19
0
        private void _onAircraftSecondFinished()
        {
            BattleTaskManager.GetBattleCameras().SetSplitCameras2D(false);
            BattleCutInCamera       cutInCamera       = BattleTaskManager.GetBattleCameras().cutInCamera;
            BattleCutInEffectCamera cutInEffectCamera = BattleTaskManager.GetBattleCameras().cutInEffectCamera;

            cutInCamera.cullingMask       = (Generics.Layers.UI2D | Generics.Layers.CutIn);
            cutInEffectCamera.cullingMask = Generics.Layers.CutIn;
            cutInCamera.depth             = 5f;
            cutInEffectCamera.depth       = 4f;
            cutInEffectCamera.glowEffect.set_enabled(true);
            this.PlayProdDamage(this._clsKoukuu2, delegate
            {
                this.EndPhase(BattleUtils.NextPhase(BattlePhase.AerialCombatSecond));
            });
            if (this._prodAerialSecondP2 != null)
            {
                Object.Destroy(this._prodAerialSecondP2.get_gameObject());
            }
            if (this._prodAerialTouchPlane != null)
            {
                this._prodAerialTouchPlane.Hide();
            }
        }
예제 #20
0
        private void _onAircraftCombatFinished()
        {
            BattleTaskManager.GetBattleCameras().SetSplitCameras2D(isSplit: false);
            BattleCutInCamera       cutInCamera       = BattleTaskManager.GetBattleCameras().cutInCamera;
            BattleCutInEffectCamera cutInEffectCamera = BattleTaskManager.GetBattleCameras().cutInEffectCamera;

            cutInCamera.cullingMask              = (Generics.Layers.UI2D | Generics.Layers.CutIn);
            cutInEffectCamera.cullingMask        = Generics.Layers.CutIn;
            cutInCamera.depth                    = 5f;
            cutInEffectCamera.depth              = 4f;
            cutInEffectCamera.glowEffect.enabled = false;
            PlayProdDamage(_clsKoukuu, delegate
            {
                EndPhase(BattleUtils.NextPhase(BattlePhase.AerialCombat));
            });
            if (_prodAerialCombatP2 != null)
            {
                Object.Destroy(_prodAerialCombatP2.gameObject);
            }
            if (_prodAerialTouchPlane != null)
            {
                _prodAerialTouchPlane.Hide();
            }
        }
        private void _onAircraftCombatFinished()
        {
            BattleTaskManager.GetBattleCameras().SetSplitCameras2D(isSplit: false);
            BattleCutInCamera       cutInCamera       = BattleTaskManager.GetBattleCameras().cutInCamera;
            BattleCutInEffectCamera cutInEffectCamera = BattleTaskManager.GetBattleCameras().cutInEffectCamera;

            cutInCamera.cullingMask              = (Generics.Layers.UI2D | Generics.Layers.CutIn);
            cutInEffectCamera.cullingMask        = Generics.Layers.CutIn;
            cutInCamera.depth                    = 5f;
            cutInEffectCamera.depth              = 4f;
            cutInEffectCamera.glowEffect.enabled = true;
            PlayProdDamage(_clsKoukuu1, delegate
            {
                _clsState.AddState(_initAerialSecondCutIn, _updateAerialSecondCutIn);
            });
            if (_prodAerialCombatP2 != null)
            {
                Object.Destroy(_prodAerialCombatP2.gameObject);
            }
            if (_prodAerialTouchPlane != null)
            {
                _prodAerialTouchPlane.Hide();
            }
        }
예제 #22
0
        private void _onAircraftCombatFinished()
        {
            BattleTaskManager.GetBattleCameras().SetSplitCameras2D(false);
            BattleCutInCamera       cutInCamera       = BattleTaskManager.GetBattleCameras().cutInCamera;
            BattleCutInEffectCamera cutInEffectCamera = BattleTaskManager.GetBattleCameras().cutInEffectCamera;

            cutInCamera.cullingMask       = (Generics.Layers.UI2D | Generics.Layers.CutIn);
            cutInEffectCamera.cullingMask = Generics.Layers.CutIn;
            cutInCamera.depth             = 5f;
            cutInEffectCamera.depth       = 4f;
            cutInEffectCamera.glowEffect.set_enabled(true);
            this.PlayProdDamage(this._clsKoukuu1, delegate
            {
                this._clsState.AddState(new StatementMachine.StatementMachineInitialize(this._initAerialSecondCutIn), new StatementMachine.StatementMachineUpdate(this._updateAerialSecondCutIn));
            });
            if (this._prodAerialCombatP2 != null)
            {
                Object.Destroy(this._prodAerialCombatP2.get_gameObject());
            }
            if (this._prodAerialTouchPlane != null)
            {
                this._prodAerialTouchPlane.Hide();
            }
        }