Ejemplo n.º 1
0
        public IObservable <bool> Play()
        {
            ObserverActionQueue observerAction = BattleTaskManager.GetObserverAction();

            observerAction.Executions();
            BattleShips battleShips = BattleTaskManager.GetBattleShips();

            battleShips.SetStandingPosition(StandingPositionType.CommandBuffer);
            BattleCameras battleCameras = BattleTaskManager.GetBattleCameras();

            battleCameras.SetVerticalSplitCameras(false);
            battleCameras.fieldDimCamera.maskAlpha = 0f;
            battleCameras.SwitchMainCamera(FleetType.Friend);
            BattleFieldCamera battleFieldCamera = battleCameras.fieldCameras.get_Item(0);

            battleFieldCamera.ReqViewMode(CameraActor.ViewMode.FixChasing);
            battleFieldCamera.pointOfGaze = Vector3.Lerp(BattleTaskManager.GetBattleField().dicFleetAnchor.get_Item(FleetType.Friend).get_position(), BattleTaskManager.GetBattleField().dicFleetAnchor.get_Item(FleetType.Enemy).get_position(), 0.8f);
            battleFieldCamera.vignetting.set_enabled(true);
            battleFieldCamera.glowEffect.set_enabled(true);
            battleShips.SetBollboardTarget(null);
            battleShips.SetLayer(Generics.Layers.ShipGirl);
            BattleCutInEffectCamera cutInEffectCamera = BattleTaskManager.GetBattleCameras().cutInEffectCamera;
            UITexture component = cutInEffectCamera.get_transform().FindChild("TorpedoLine/OverlayLine").GetComponent <UITexture>();

            if (component != null)
            {
                component.alpha = 0f;
            }
            Observable.NextFrame(FrameCountType.Update).Subscribe(delegate(Unit _)
            {
                this.CalcInitLineRotation();
                this.PlayLineAnimation();
            });
            return(Observable.FromCoroutine <bool>((IObserver <bool> observer) => this.AnimationObserver(observer)));
        }
        private int[] addHpGauge(bool isFriend, BattleHPGauges hpGauges)
        {
            BattleCutInCamera cutInCamera = BattleTaskManager.GetBattleCameras().cutInCamera;
            int num      = (!isFriend) ? this._eBattleship.get_Count() : this._fBattleship.get_Count();
            int arg_3A_0 = (!isFriend) ? 1 : 0;

            int[] array = new int[num];
            List <ShipModel_Defender> defenders = this._clsRaigeki.GetDefenders(isFriend, true);

            for (int i = 0; i < num; i++)
            {
                hpGauges.AddInstantiates(cutInCamera.get_transform().get_gameObject(), isFriend, false, true, true);
                array[i] = defenders.get_Item(i).HpBefore;
                if (isFriend)
                {
                    this._dicIsMiss.get_Item(FleetType.Friend)[i]      = false;
                    this._dicIsCriticall.get_Item(FleetType.Friend)[i] = false;
                }
                else
                {
                    this._dicIsMiss.get_Item(FleetType.Enemy)[i]      = false;
                    this._dicIsCriticall.get_Item(FleetType.Enemy)[i] = false;
                }
            }
            return(array);
        }
Ejemplo n.º 3
0
        public void RadarObjectConvergence()
        {
            BattleTaskManager.GetBattleCameras().fieldCameras.get_Item(0).glowEffect.set_enabled(false);
            BattleShips battleShips = BattleTaskManager.GetBattleShips();

            battleShips.RadarDeployment(false);
        }
Ejemplo n.º 4
0
        private int[] addHpGauge(bool isFriend, BattleHPGauges hpGauges)
        {
            BattleCutInCamera cutInCamera = BattleTaskManager.GetBattleCameras().cutInCamera;
            int num = (!isFriend) ? _eBattleship.Count : _fBattleship.Count;

            if (isFriend)
            {
            }
            int[] array = new int[num];
            List <ShipModel_Defender> defenders = _clsRaigeki.GetDefenders(isFriend, all: true);

            for (int i = 0; i < num; i++)
            {
                hpGauges.AddInstantiates(cutInCamera.transform.gameObject, isFriend, isLight: false, isT: true, isNumber: true);
                array[i] = defenders[i].HpBefore;
                if (isFriend)
                {
                    _dicIsMiss[FleetType.Friend][i]      = false;
                    _dicIsCriticall[FleetType.Friend][i] = false;
                }
                else
                {
                    _dicIsMiss[FleetType.Enemy][i]      = false;
                    _dicIsCriticall[FleetType.Enemy][i] = false;
                }
            }
            return(array);
        }
        public void Play(Action callBack)
        {
            this._actCallback = callBack;
            BattleCameras     battleCameras = BattleTaskManager.GetBattleCameras();
            BattleFieldCamera fieldCamF     = battleCameras.friendFieldCamera;
            BattleFieldCamera fieldCamE     = battleCameras.enemyFieldCamera;

            this.setFieldCamera(fieldCamF, fieldCamE);
            if (this._isProtect[0])
            {
                this._camTargetPosF = this.calcCloseUpCamPos(fieldCamF.get_transform().get_position(), FleetType.Friend);
                fieldCamF.get_transform().MoveTo(this._camTargetPosF.get_Item(0), BattleDefines.SHELLING_ATTACK_DEFENDER_CLOSEUP_TIME.get_Item(0), iTween.EaseType.linear, delegate
                {
                    fieldCamF.motionBlur.set_enabled(false);
                    this.PlayProtectDefender(fieldCamF, FleetType.Friend);
                });
            }
            if (this._isProtect[1])
            {
                this._camTargetPosE = this.calcCloseUpCamPos(fieldCamE.get_transform().get_position(), FleetType.Enemy);
                fieldCamE.get_transform().MoveTo(this._camTargetPosE.get_Item(0), BattleDefines.SHELLING_ATTACK_DEFENDER_CLOSEUP_TIME.get_Item(0), iTween.EaseType.linear, delegate
                {
                    fieldCamE.motionBlur.set_enabled(false);
                    this.PlayProtectDefender(fieldCamE, FleetType.Enemy);
                });
            }
        }
Ejemplo n.º 6
0
 public void Play(DamageCutInType iType, Action onStart, Action onFinished)
 {
     if (!isPlaying)
     {
         _iType = iType;
         panel.widgetsAreStatic    = false;
         base.transform.localScale = Vector3.one;
         BattleCutInEffectCamera cutInEffectCamera = BattleTaskManager.GetBattleCameras().cutInEffectCamera;
         cutInEffectCamera.motionBlur.enabled    = true;
         cutInEffectCamera.motionBlur.blurAmount = 0.3f;
         cutInEffectCamera.glowEffect.enabled    = false;
         cutInEffectCamera.isCulling             = true;
         _traShips.localPositionZero();
         DamageCutInList damageCutInList = (_iType != 0) ? DamageCutInList.ProdDamageCutInHeavyFirst : DamageCutInList.ProdDamageCutInModerateFirst;
         if (_iType == DamageCutInType.Moderate)
         {
             ((Component)_psModerateSmoke).SetActive(isActive: true);
             _psModerateSmoke.Play();
         }
         else
         {
             ((Component)_psHeavyBack).SetActive(isActive: true);
             _psHeavyBack.Play();
         }
         Dlg.Call(ref onStart);
         base.Play(damageCutInList, onFinished);
     }
 }
Ejemplo n.º 7
0
        private bool _init()
        {
            isAnimeFinished = false;
            _isPlaying      = false;
            _actCallback    = null;
            GameObject gameObject = base.transform.FindChild("Aircraft").gameObject;

            _uiAirObj     = new GameObject[3];
            _uiAircraft   = new UITexture[3];
            _airAnimation = (Animation[])new Animation[3];
            for (int i = 0; i < 3; i++)
            {
                if (_uiAirObj[i] == null)
                {
                    _uiAirObj[i] = gameObject.transform.FindChild("Aircraft" + (i + 1)).gameObject;
                }
                Util.FindParentToChild(ref _uiAircraft[i], _uiAirObj[i].transform, "Swing/Aircraft");
                _airAnimation[i] = _uiAircraft[i].GetComponent <Animation>();
            }
            if (_uiShipObj == null)
            {
                _uiShipObj = base.transform.FindChild("ShipObj").gameObject;
            }
            Util.FindParentToChild(ref _uiShip, _uiShipObj.transform, "Ship");
            Util.FindParentToChild <ParticleSystem>(ref _cloudParticle, base.transform, "Cloud");
            _camFieldCamera = BattleTaskManager.GetBattleCameras().friendFieldCamera;
            _camFieldCamera.ReqViewMode(CameraActor.ViewMode.NotViewModeCtrl);
            return(true);
        }
Ejemplo n.º 8
0
        public override void Play(Action callback)
        {
            ObserverActionQueue observerAction = BattleTaskManager.GetObserverAction();

            observerAction.Executions();
            BattleCutInEffectCamera cutInEffectCamera = BattleTaskManager.GetBattleCameras().cutInEffectCamera;

            cutInEffectCamera.isCulling = true;
            base.get_transform().set_localScale(Vector3.get_one());
            this._actCallback = callback;
            base.GetComponent <UIPanel>().widgetsAreStatic = false;
            if (this._iList == ProdTorpedoCutIn.AnimationList.None)
            {
                this.onAnimationFinishedAfterDiscard();
                return;
            }
            base.Play(this._iList, callback);
            if (this._iList == ProdTorpedoCutIn.AnimationList.ProdTorpedoCutIn || this._iList == ProdTorpedoCutIn.AnimationList.TorpedoCutInFriend)
            {
                ShipUtils.PlayTorpedoVoice(this.getTorpedoCutInShip(this._clsRaigeki, true));
            }
            else if (this._iList == ProdTorpedoCutIn.AnimationList.TorpedoCutInEnemy)
            {
            }
        }
        protected override bool InitDefenderFocus(object data)
        {
            BattleCameras     battleCameras           = BattleTaskManager.GetBattleCameras();
            BattleFieldCamera fieldCam                = battleCameras.fieldCameras.get_Item(0);
            Vector3           calcDefenderCamStartPos = this.CalcDefenderCamStartPos;

            this.SetFieldCamera(false, calcDefenderCamStartPos, this._listBattleShips.get_Item(1).spPointOfGaze);
            List <Vector3> camTargetPos = this.CalcCloseUpCamPos(fieldCam.get_transform().get_position(), this.CalcCamTargetPos(false, false), base.isProtect);

            base.alterWaveDirection = this._listBattleShips.get_Item(1).fleetType;
            this.playDepthCharge(this._listBattleShips.get_Item(1), 0f);
            this.GraAddDimCameraMaskAlpha((!this._isSkipAttack) ? BattleDefines.SHELLING_ATTACK_ATTACKER_CLOSEUP_TIME.get_Item(0) : 0f);
            fieldCam.get_transform().LTMove(camTargetPos.get_Item(0), BattleDefines.SHELLING_ATTACK_DEFENDER_CLOSEUP_TIME.get_Item(0)).setEase(BattleDefines.SHELLING_ATTACK_DEFENDER_CLOSEUP_EASING_TYPE.get_Item(0)).setOnComplete(delegate
            {
                fieldCam.motionBlur.set_enabled(false);
                if (this.isProtect)
                {
                    this.PlayProtectDefender(camTargetPos);
                }
                else
                {
                    this.PlayDefenderEffect(this._listBattleShips.get_Item(1), this._listBattleShips.get_Item(1).pointOfGaze, fieldCam, 0.5f);
                    this.ChkDamagedStateFmAnticipating(camTargetPos.get_Item(1));
                }
            });
            return(false);
        }
Ejemplo n.º 10
0
 public void _startAntiAerialCutIn()
 {
     if (_koukuuModel.GetTaikuShip(is_friend: true) != null)
     {
         if (_prodAntiAerialCutIn == null)
         {
             BattleCutInEffectCamera cutInEffectCamera = BattleTaskManager.GetBattleCameras().cutInEffectCamera;
             _prodAntiAerialCutIn = ProdAntiAerialCutIn.Instantiate(Resources.Load <ProdAntiAerialCutIn>("Prefabs/Battle/Production/AerialCombat/ProdAntiAerialCutIn"), _koukuuModel, cutInEffectCamera.transform);
         }
         _prodAntiAerialCutIn.Play(_compAntiAerialCutInEnemy, isFriend: true);
     }
     else if (_koukuuModel.GetTaikuShip(is_friend: false) != null)
     {
         if (_prodAntiAerialCutIn == null)
         {
             BattleCutInEffectCamera cutInEffectCamera2 = BattleTaskManager.GetBattleCameras().cutInEffectCamera;
             _prodAntiAerialCutIn = ProdAntiAerialCutIn.Instantiate(Resources.Load <ProdAntiAerialCutIn>("Prefabs/Battle/Production/AerialCombat/ProdAntiAerialCutIn"), _koukuuModel, cutInEffectCamera2.transform);
         }
         _prodAntiAerialCutIn.Play(_compAntiAerialCutInEnemy, isFriend: false);
     }
     else
     {
         _compAntiAerialCutInEnemy();
     }
 }
Ejemplo n.º 11
0
        public void RadarObjectConvergence()
        {
            BattleTaskManager.GetBattleCameras().fieldCameras[0].glowEffect.enabled = false;
            BattleShips battleShips = BattleTaskManager.GetBattleShips();

            battleShips.RadarDeployment(isDeploy: false);
        }
        protected override void onAnimationFinished()
        {
            ObserverActionQueue observerAction = BattleTaskManager.GetObserverAction();

            observerAction.Register(delegate
            {
                List <ParticleSystem> list = new List <ParticleSystem>(base.get_transform().GetComponentsInChildren <ParticleSystem>());
                list.ForEach(delegate(ParticleSystem x)
                {
                    x.SetActive(false);
                });
                base.get_transform().localScaleZero();
                this.panel.widgetsAreStatic = true;
                BattleCutInEffectCamera cutInEffectCamera = BattleTaskManager.GetBattleCameras().cutInEffectCamera;
                GameObject gameObject = cutInEffectCamera.get_transform().Find("TorpedoLine/OverlayLine").get_gameObject();
                if (gameObject != null)
                {
                    UITexture component = gameObject.GetComponent <UITexture>();
                    if (component != null && component.alpha <= 0.1f)
                    {
                        cutInEffectCamera.isCulling = false;
                    }
                }
                cutInEffectCamera.motionBlur.set_enabled(false);
                cutInEffectCamera.blur.set_enabled(false);
            });
            base.onAnimationFinished();
        }
Ejemplo n.º 13
0
        protected override void Awake()
        {
            base.Awake();
            if (_uiBackground == null)
            {
                Util.FindParentToChild(ref _uiBackground, base.transform, "Background");
            }
            if (_listDamageShips == null)
            {
                _listDamageShips = new List <DamageShip>();
                for (int i = 0; i < 3; i++)
                {
                    _listDamageShips.Add(new DamageShip(base.transform, $"ShipShakeAnchor/Ships/Ship{i + 1}"));
                }
            }
            Transform transform = UnityEngine.Object.Instantiate(_prefabModerateOrHeavy, Vector3.zero, Quaternion.identity) as Transform;

            transform.parent = BattleTaskManager.GetBattleCameras().cutInCamera.transform;
            transform.transform.localPosition = new Vector3(0f, 0f, -30f);
            _ctrlModerateOrHeavy = ((Component)transform).GetComponent <ModerateOrHeavyController>();
            List <ParticleSystem> list = new List <ParticleSystem>(base.transform.GetComponentsInChildren <ParticleSystem>());

            list.ForEach(delegate(ParticleSystem x)
            {
                ((Component)x).SetActive(isActive: false);
            });
            _nDrawShipNum = 0;
            _psModerateSmoke.Stop();
            panel.widgetsAreStatic    = true;
            base.transform.localScale = Vector3.zero;
        }
        private void onFirstAnimationFinished()
        {
            BattleCutInEffectCamera cutInEffectCamera = BattleTaskManager.GetBattleCameras().cutInEffectCamera;

            cutInEffectCamera.motionBlur.set_enabled(false);
            int num = 0;

            using (List <ProdDamageCutIn.DamageShip> .Enumerator enumerator = this._listDamageShips.GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    ProdDamageCutIn.DamageShip current = enumerator.get_Current();
                    current.transform.set_localPosition(BattleDefines.DAMAGE_CUT_IN_SHIP_DRAW_POS.get_Item(this._nDrawShipNum).get_Item(num));
                    current.transform.set_localScale(Vector3.get_one());
                    current.shipTexture.alpha = 1f;
                    num++;
                }
            }
            this._traShips.get_transform().set_localScale(Vector3.get_one() * 7.5f);
            this._traShips.get_transform().set_localPosition(Vector3.get_down() * 70f);
            if (this._clsShipModel != null)
            {
                KCV.Battle.Utils.ShipUtils.PlayDamageCutInVoice(this._clsShipModel);
            }
            ProdDamageCutIn.DamageCutInList damageCutInList = (this._iType != ProdDamageCutIn.DamageCutInType.Moderate) ? ProdDamageCutIn.DamageCutInList.ProdDamageCutInHeavySecond : ProdDamageCutIn.DamageCutInList.ProdDamageCutInModerateSecond;
            this._animAnimation.Play(damageCutInList.ToString());
        }
        public void Play(ProdDamageCutIn.DamageCutInType iType, Action onStart, Action onFinished)
        {
            if (this.isPlaying)
            {
                return;
            }
            this._iType = iType;
            this.panel.widgetsAreStatic = false;
            base.get_transform().set_localScale(Vector3.get_one());
            BattleCutInEffectCamera cutInEffectCamera = BattleTaskManager.GetBattleCameras().cutInEffectCamera;

            cutInEffectCamera.motionBlur.set_enabled(true);
            cutInEffectCamera.motionBlur.blurAmount = 0.3f;
            cutInEffectCamera.glowEffect.set_enabled(false);
            cutInEffectCamera.isCulling = true;
            this._traShips.localPositionZero();
            ProdDamageCutIn.DamageCutInList damageCutInList = (this._iType != ProdDamageCutIn.DamageCutInType.Moderate) ? ProdDamageCutIn.DamageCutInList.ProdDamageCutInHeavyFirst : ProdDamageCutIn.DamageCutInList.ProdDamageCutInModerateFirst;
            if (this._iType == ProdDamageCutIn.DamageCutInType.Moderate)
            {
                this._psModerateSmoke.SetActive(true);
                this._psModerateSmoke.Play();
            }
            else
            {
                this._psHeavyBack.SetActive(true);
                this._psHeavyBack.Play();
            }
            Dlg.Call(ref onStart);
            base.Play(damageCutInList, onFinished);
        }
        protected override void Awake()
        {
            base.Awake();
            if (this._uiBackground == null)
            {
                Util.FindParentToChild <UITexture>(ref this._uiBackground, base.get_transform(), "Background");
            }
            if (this._listDamageShips == null)
            {
                this._listDamageShips = new List <ProdDamageCutIn.DamageShip>();
                for (int i = 0; i < 3; i++)
                {
                    this._listDamageShips.Add(new ProdDamageCutIn.DamageShip(base.get_transform(), string.Format("ShipShakeAnchor/Ships/Ship{0}", i + 1)));
                }
            }
            Transform transform = Object.Instantiate(this._prefabModerateOrHeavy, Vector3.get_zero(), Quaternion.get_identity()) as Transform;

            transform.set_parent(BattleTaskManager.GetBattleCameras().cutInCamera.get_transform());
            transform.get_transform().set_localPosition(new Vector3(0f, 0f, -30f));
            this._ctrlModerateOrHeavy = transform.GetComponent <ModerateOrHeavyController>();
            List <ParticleSystem> list = new List <ParticleSystem>(base.get_transform().GetComponentsInChildren <ParticleSystem>());

            list.ForEach(delegate(ParticleSystem x)
            {
                x.SetActive(false);
            });
            this._nDrawShipNum = 0;
            this._psModerateSmoke.Stop();
            this.panel.widgetsAreStatic = true;
            base.get_transform().set_localScale(Vector3.get_zero());
        }
Ejemplo n.º 17
0
        public UniRx.IObservable <bool> Play()
        {
            ObserverActionQueue observerAction = BattleTaskManager.GetObserverAction();

            observerAction.Executions();
            BattleShips battleShips = BattleTaskManager.GetBattleShips();

            battleShips.SetStandingPosition(StandingPositionType.CommandBuffer);
            BattleCameras battleCameras = BattleTaskManager.GetBattleCameras();

            battleCameras.SetVerticalSplitCameras(isSplit: false);
            battleCameras.fieldDimCamera.maskAlpha = 0f;
            battleCameras.SwitchMainCamera(FleetType.Friend);
            BattleFieldCamera battleFieldCamera = battleCameras.fieldCameras[0];

            battleFieldCamera.ReqViewMode(CameraActor.ViewMode.FixChasing);
            battleFieldCamera.pointOfGaze        = Vector3.Lerp(BattleTaskManager.GetBattleField().dicFleetAnchor[FleetType.Friend].position, BattleTaskManager.GetBattleField().dicFleetAnchor[FleetType.Enemy].position, 0.8f);
            battleFieldCamera.vignetting.enabled = true;
            battleFieldCamera.glowEffect.enabled = true;
            battleShips.SetBollboardTarget(null);
            battleShips.SetLayer(Generics.Layers.ShipGirl);
            BattleCutInEffectCamera cutInEffectCamera = BattleTaskManager.GetBattleCameras().cutInEffectCamera;
            UITexture component = ((Component)cutInEffectCamera.transform.FindChild("TorpedoLine/OverlayLine")).GetComponent <UITexture>();

            if (component != null)
            {
                component.alpha = 0f;
            }
            Observable.NextFrame().Subscribe(delegate
            {
                CalcInitLineRotation();
                PlayLineAnimation();
            });
            return(Observable.FromCoroutine((UniRx.IObserver <bool> observer) => AnimationObserver(observer)));
        }
        public Vector3 calcCamTargetPos(bool isPointOfGaze)
        {
            BattleFieldCamera friendFieldCamera = BattleTaskManager.GetBattleCameras().friendFieldCamera;
            Vector3           vector            = Mathe.NormalizeDirection((!isPointOfGaze) ? this._listBattleShip.get_Item(0).spPointOfGaze : this._listBattleShip.get_Item(0).pointOfGaze, friendFieldCamera.eyePosition) * 10f;

            return((!isPointOfGaze) ? new Vector3(this._listBattleShip.get_Item(0).spPointOfGaze.x + vector.x, this._listBattleShip.get_Item(0).spPointOfGaze.y, this._listBattleShip.get_Item(0).spPointOfGaze.z + vector.z) : new Vector3(this._listBattleShip.get_Item(0).pointOfGaze.x + vector.x, this._listBattleShip.get_Item(0).pointOfGaze.y, this._listBattleShip.get_Item(0).pointOfGaze.z + vector.z));
        }
Ejemplo n.º 19
0
        public Vector3 calcCamTargetPos(bool isPointOfGaze)
        {
            BattleFieldCamera friendFieldCamera = BattleTaskManager.GetBattleCameras().friendFieldCamera;
            Vector3           vector            = Mathe.NormalizeDirection((!isPointOfGaze) ? _listBattleShip[0].spPointOfGaze : _listBattleShip[0].pointOfGaze, friendFieldCamera.eyePosition) * 10f;
            Vector3           result;

            if (isPointOfGaze)
            {
                Vector3 pointOfGaze  = _listBattleShip[0].pointOfGaze;
                float   x            = pointOfGaze.x + vector.x;
                Vector3 pointOfGaze2 = _listBattleShip[0].pointOfGaze;
                float   y            = pointOfGaze2.y;
                Vector3 pointOfGaze3 = _listBattleShip[0].pointOfGaze;
                result = new Vector3(x, y, pointOfGaze3.z + vector.z);
            }
            else
            {
                Vector3 spPointOfGaze  = _listBattleShip[0].spPointOfGaze;
                float   x2             = spPointOfGaze.x + vector.x;
                Vector3 spPointOfGaze2 = _listBattleShip[0].spPointOfGaze;
                float   y2             = spPointOfGaze2.y;
                Vector3 spPointOfGaze3 = _listBattleShip[0].spPointOfGaze;
                result = new Vector3(x2, y2, spPointOfGaze3.z + vector.z);
            }
            return(result);
        }
Ejemplo n.º 20
0
        protected override bool InitDefenderFocus(object data)
        {
            BattleCameras     battleCameras           = BattleTaskManager.GetBattleCameras();
            BattleFieldCamera fieldCam                = battleCameras.fieldCameras[0];
            Vector3           calcDefenderCamStartPos = CalcDefenderCamStartPos;

            SetFieldCamera(isAttacker: false, calcDefenderCamStartPos, _listBattleShips[1].spPointOfGaze);
            List <Vector3> camTargetPos = CalcCloseUpCamPos(fieldCam.transform.position, CalcCamTargetPos(isAttacker: false, isPointOfGaze: false), base.isProtect);

            base.alterWaveDirection = _listBattleShips[0].fleetType;
            GraAddDimCameraMaskAlpha((!_isSkipAttack) ? BattleDefines.SHELLING_ATTACK_ATTACKER_CLOSEUP_TIME[0] : 0f);
            fieldCam.transform.LTMove(camTargetPos[0], BattleDefines.SHELLING_ATTACK_DEFENDER_CLOSEUP_TIME[0]).setEase(BattleDefines.SHELLING_ATTACK_DEFENDER_CLOSEUP_EASING_TYPE[0]).setOnComplete((Action) delegate
            {
                fieldCam.motionBlur.enabled = false;
                if (base.isProtect)
                {
                    PlayProtectDefender(camTargetPos);
                }
                else
                {
                    PlayDefenderEffect(_listBattleShips[1], _listBattleShips[1].pointOfGaze, fieldCam, 0.5f);
                    ChkDamagedStateFmAnticipating(camTargetPos[1]);
                }
            });
            return(false);
        }
Ejemplo n.º 21
0
        public void Play(Action callBack)
        {
            _actCallback = callBack;
            BattleCameras     battleCameras = BattleTaskManager.GetBattleCameras();
            BattleFieldCamera fieldCamF     = battleCameras.friendFieldCamera;
            BattleFieldCamera fieldCamE     = battleCameras.enemyFieldCamera;

            setFieldCamera(fieldCamF, fieldCamE);
            if (_isProtect[0])
            {
                _camTargetPosF = calcCloseUpCamPos(fieldCamF.transform.position, FleetType.Friend);
                fieldCamF.transform.MoveTo(_camTargetPosF[0], BattleDefines.SHELLING_ATTACK_DEFENDER_CLOSEUP_TIME[0], iTween.EaseType.linear, delegate
                {
                    fieldCamF.motionBlur.enabled = false;
                    PlayProtectDefender(fieldCamF, FleetType.Friend);
                });
            }
            if (_isProtect[1])
            {
                _camTargetPosE = calcCloseUpCamPos(fieldCamE.transform.position, FleetType.Enemy);
                fieldCamE.transform.MoveTo(_camTargetPosE[0], BattleDefines.SHELLING_ATTACK_DEFENDER_CLOSEUP_TIME[0], iTween.EaseType.linear, delegate
                {
                    fieldCamE.motionBlur.enabled = false;
                    PlayProtectDefender(fieldCamE, FleetType.Enemy);
                });
            }
        }
        protected override bool InitAttackerFocus(object data)
        {
            BattleCameras     battleCameras = BattleTaskManager.GetBattleCameras();
            BattleFieldCamera fieldCam      = battleCameras.fieldCameras[0];
            List <Vector3>    camTargetPos  = CalcCloseUpCamPos(fieldCam.transform.position, CalcCamTargetPos(isAttacker: true, isPointOfGaze: true), isProtect: false);

            base.alterWaveDirection = _listBattleShips[0].fleetType;
            KCV.Utils.SoundUtils.PlaySE(SEFIleInfos.SE_936);
            GraAddDimCameraMaskAlpha(BattleDefines.SHELLING_ATTACK_ATTACKER_CLOSEUP_TIME[0]);
            fieldCam.transform.LTMove(camTargetPos[0], BattleDefines.SHELLING_ATTACK_ATTACKER_CLOSEUP_TIME[0]).setEase(BattleDefines.SHELLING_ATTACK_ATTACKER_CLOSEUP_EASING_TYPE[0]).setOnComplete((Action) delegate
            {
                ObserverActionQueue observerAction = BattleTaskManager.GetObserverAction();
                observerAction.Register(delegate
                {
                    _prodObservedShellingCutIn.transform.localScaleZero();
                });
                _prodObservedShellingCutIn.SetObservedShelling(_clsHougekiModel);
                _prodObservedShellingCutIn.Play(delegate
                {
                    ChkAttackCntForNextPhase();
                });
                fieldCam.transform.LTMove(camTargetPos[1], BattleDefines.SHELLING_ATTACK_ATTACKER_CLOSEUP_TIME[1]).setEase(LeanTweenType.linear);
            });
            return(false);
        }
        public IEnumerator _init()
        {
            _explosionTime = 0f;
            _isEx          = false;
            _isMiss        = false;
            _isProtectE    = false;
            _fBattleship   = BattleTaskManager.GetBattleShips().dicFriendBattleShips;
            _eBattleship   = BattleTaskManager.GetBattleShips().dicEnemyBattleShips;
            _camAerial     = BattleTaskManager.GetBattleCameras().friendFieldCamera;
            _camAerial.ReqViewMode(CameraActor.ViewMode.NotViewModeCtrl);
            if (_mainObj == null)
            {
                _mainObj = base.transform.FindChild("Aircraft").gameObject;
            }
            if ((UnityEngine.Object)_anime == null)
            {
                _anime = ((Component)base.transform).GetComponent <Animation>();
            }
            _aircraftObj = new GameObject[3];
            for (int i = 0; i < 3; i++)
            {
                _aircraftObj[i] = _mainObj.transform.FindChild("Aircraft" + (3 - i)).gameObject;
            }
            BattleCutInCamera cutInCamera = BattleTaskManager.GetBattleCameras().cutInCamera;

            if (_rescueCutIn == null)
            {
                _rescueCutIn = GetComponent <ProdAerialRescueCutIn>();
            }
            _rescueCutIn._init();
            yield return(null);
        }
 private void _startZoomTorpedo()
 {
     if (this._listTorpedoWake != null)
     {
         using (List <PSTorpedoWake> .Enumerator enumerator = this._listTorpedoWake.GetEnumerator())
         {
             while (enumerator.MoveNext())
             {
                 PSTorpedoWake current = enumerator.get_Current();
                 current.SetActive(false);
                 Object.Destroy(current);
             }
         }
         this._listTorpedoWake.Clear();
     }
     this._listTorpedoWake = null;
     BattleTaskManager.GetBattleCameras().SetVerticalSplitCameras(false);
     if (this._dicIsAttack.get_Item(FleetType.Friend))
     {
         this._setTorpedoWakeZoom(true);
     }
     else if (this._dicIsAttack.get_Item(FleetType.Enemy))
     {
         this._setTorpedoWakeZoom(false);
     }
 }
Ejemplo n.º 25
0
        private void _setCameraRotation()
        {
            BattleFieldCamera friendFieldCamera = BattleTaskManager.GetBattleCameras().friendFieldCamera;

            friendFieldCamera.ReqViewMode(CameraActor.ViewMode.RotateAroundObject);
            friendFieldCamera.SetRotateAroundObjectCamera(Vector3.get_zero(), new Vector3(0f, 19f, 220f), 1f);
        }
Ejemplo n.º 26
0
 public void _startAntiAerialCutIn()
 {
     if (this._koukuuModel.GetTaikuShip(true) != null)
     {
         if (this._prodAntiAerialCutIn == null)
         {
             BattleCutInEffectCamera cutInEffectCamera = BattleTaskManager.GetBattleCameras().cutInEffectCamera;
             this._prodAntiAerialCutIn = ProdAntiAerialCutIn.Instantiate(Resources.Load <ProdAntiAerialCutIn>("Prefabs/Battle/Production/AerialCombat/ProdAntiAerialCutIn"), this._koukuuModel, cutInEffectCamera.get_transform());
         }
         this._prodAntiAerialCutIn.Play(new Action(this._compAntiAerialCutInEnemy), true);
     }
     else if (this._koukuuModel.GetTaikuShip(false) != null)
     {
         if (this._prodAntiAerialCutIn == null)
         {
             BattleCutInEffectCamera cutInEffectCamera2 = BattleTaskManager.GetBattleCameras().cutInEffectCamera;
             this._prodAntiAerialCutIn = ProdAntiAerialCutIn.Instantiate(Resources.Load <ProdAntiAerialCutIn>("Prefabs/Battle/Production/AerialCombat/ProdAntiAerialCutIn"), this._koukuuModel, cutInEffectCamera2.get_transform());
         }
         this._prodAntiAerialCutIn.Play(new Action(this._compAntiAerialCutInEnemy), false);
     }
     else
     {
         this._compAntiAerialCutInEnemy();
     }
 }
        protected override bool InitAttackerFocus(object data)
        {
            BattleCameras     battleCameras = BattleTaskManager.GetBattleCameras();
            BattleFieldCamera fieldCam      = battleCameras.fieldCameras.get_Item(0);
            List <Vector3>    camTargetPos  = this.CalcCloseUpCamPos(fieldCam.get_transform().get_position(), this.CalcCamTargetPos(true, true), false);

            base.alterWaveDirection = this._listBattleShips.get_Item(0).fleetType;
            KCV.Utils.SoundUtils.PlaySE(SEFIleInfos.SE_936);
            this.GraAddDimCameraMaskAlpha(BattleDefines.SHELLING_ATTACK_ATTACKER_CLOSEUP_TIME.get_Item(0));
            fieldCam.get_transform().LTMove(camTargetPos.get_Item(0), BattleDefines.SHELLING_ATTACK_ATTACKER_CLOSEUP_TIME.get_Item(0)).setEase(BattleDefines.SHELLING_ATTACK_ATTACKER_CLOSEUP_EASING_TYPE.get_Item(0)).setOnComplete(delegate
            {
                ObserverActionQueue observerAction = BattleTaskManager.GetObserverAction();
                observerAction.Register(delegate
                {
                    BattleCutInEffectCamera cutInEffectCamera = BattleTaskManager.GetBattleCameras().cutInEffectCamera;
                    cutInEffectCamera.isCulling = false;
                    this._prodTranscendenceCutIn.get_transform().localScaleZero();
                });
                this._prodTranscendenceCutIn.SetShellingData(this._clsHougekiModel);
                this._prodTranscendenceCutIn.Play(delegate
                {
                    this.ChkAttackCntForNextPhase();
                });
                fieldCam.get_transform().LTMove(camTargetPos.get_Item(1), BattleDefines.SHELLING_ATTACK_ATTACKER_CLOSEUP_TIME.get_Item(1)).setEase(LeanTweenType.linear);
            });
            return(false);
        }
Ejemplo n.º 28
0
        private void onInitBackground()
        {
            BattleShips battleShips = BattleTaskManager.GetBattleShips();

            battleShips.SetShipDrawType(FleetType.Enemy, ShipDrawType.Normal);
            battleShips.SetStandingPosition(StandingPositionType.OneRow);
            battleShips.SetLayer(Generics.Layers.ShipGirl);
            BattleField battleField = BattleTaskManager.GetBattleField();

            battleField.ResetFleetAnchorPosition();
            BattleTaskManager.GetPrefabFile().DisposeProdCommandBuffer();
            BattleCameras battleCameras = BattleTaskManager.GetBattleCameras();

            battleCameras.SwitchMainCamera(FleetType.Friend);
            battleCameras.InitEnemyFieldCameraDefault();
            BattleFieldCamera friendFieldCamera = battleCameras.friendFieldCamera;
            BattleFieldCamera enemyFieldCamera  = battleCameras.enemyFieldCamera;

            battleCameras.isFieldDimCameraEnabled = false;
            friendFieldCamera.ResetMotionBlur();
            friendFieldCamera.clearFlags  = CameraClearFlags.Skybox;
            friendFieldCamera.cullingMask = battleCameras.GetDefaultLayers();
            enemyFieldCamera.cullingMask  = battleCameras.GetEnemyCamSplitLayers();
            battleCameras.SetVerticalSplitCameras(isSplit: true);
            friendFieldCamera.ReqViewMode(CameraActor.ViewMode.NotViewModeCtrl);
            enemyFieldCamera.ReqViewMode(CameraActor.ViewMode.NotViewModeCtrl);
            Vector3 position = battleField.dicCameraAnchors[CameraAnchorType.OneRowAnchor][FleetType.Friend].position;

            friendFieldCamera.transform.position      = new Vector3(-51f, 8f, 90f);
            friendFieldCamera.transform.localRotation = Quaternion.Euler(new Vector3(10.5f, 70f, 0f));
            Vector3 position2 = battleField.dicCameraAnchors[CameraAnchorType.OneRowAnchor][FleetType.Enemy].position;

            enemyFieldCamera.transform.position = new Vector3(-51f, 8f, -90f);
            enemyFieldCamera.transform.rotation = Quaternion.Euler(new Vector3(10.5f, 111f, 0f));
            battleField.isEnemySeaLevelActive   = true;
            battleField.AlterWaveDirection(FleetType.Friend, FleetType.Friend);
            battleField.AlterWaveDirection(FleetType.Enemy, FleetType.Enemy);
            BattleShips battleShips2 = BattleTaskManager.GetBattleShips();

            battleShips2.RadarDeployment(isDeploy: false);
            battleShips2.SetBollboardTarget(isFriend: false, enemyFieldCamera.transform);
            battleShips2.SetTorpedoSalvoWakeAngle(isSet: true);
            BattleCutInEffectCamera cutInEffectCamera = BattleTaskManager.GetBattleCameras().cutInEffectCamera;
            UITexture component = ((Component)cutInEffectCamera.transform.FindChild("TorpedoLine/OverlayLine")).GetComponent <UITexture>();

            if (component != null)
            {
                component.alpha = 1f;
            }
            BattleTaskManager.GetBattleCameras().fieldDimCamera.maskAlpha = 0f;
            foreach (UIBattleShip value in BattleTaskManager.GetBattleShips().dicFriendBattleShips.Values)
            {
                value.billboard.billboardTarget = BattleTaskManager.GetBattleCameras().friendFieldCamera.transform;
            }
            foreach (UIBattleShip value2 in BattleTaskManager.GetBattleShips().dicEnemyBattleShips.Values)
            {
                value2.billboard.billboardTarget = BattleTaskManager.GetBattleCameras().enemyFieldCamera.transform;
            }
        }
 public bool _init()
 {
     this._fieldCamera   = BattleTaskManager.GetBattleCameras().friendFieldCamera;
     this._uiPanel       = new UIPanel[2];
     this._uiAirObjF     = new GameObject[2];
     this._uiAirObjE     = new GameObject[2];
     this._cloudPanel    = new UIPanel[2];
     this._bgTex         = new UITexture[2];
     this._cloudParPanel = new UIPanel[2];
     this._cloudPar      = new ParticleSystem[2];
     this._gunPar        = new ParticleSystem[2];
     this._labelPanel    = new UIPanel[2];
     this._supremacyTxt  = new UITexture[2];
     using (IEnumerator enumerator = Enum.GetValues(typeof(FleetType)).GetEnumerator())
     {
         while (enumerator.MoveNext())
         {
             FleetType fleetType = (FleetType)((int)enumerator.get_Current());
             if (fleetType != FleetType.CombinedFleet)
             {
                 Util.FindParentToChild <UIPanel>(ref this._uiPanel[(int)fleetType], base.get_transform(), string.Format("{0}Panel", fleetType.ToString()));
                 if (this._uiAirObjF[(int)fleetType] == null)
                 {
                     this._uiAirObjF[(int)fleetType] = this._uiPanel[(int)fleetType].get_transform().FindChild("FAircraft").get_gameObject();
                 }
                 if (this._uiAirObjE[(int)fleetType] == null)
                 {
                     this._uiAirObjE[(int)fleetType] = this._uiPanel[(int)fleetType].get_transform().FindChild("EAircraft").get_gameObject();
                 }
                 Util.FindParentToChild <UIPanel>(ref this._cloudPanel[(int)fleetType], base.get_transform(), string.Format("{0}CloudPanel", fleetType.ToString()));
                 Util.FindParentToChild <UITexture>(ref this._bgTex[(int)fleetType], this._cloudPanel[(int)fleetType].get_transform(), "Bg");
                 Util.FindParentToChild <UIPanel>(ref this._cloudParPanel[(int)fleetType], base.get_transform(), string.Format("{0}CloudParPanel", fleetType.ToString()));
                 Util.FindParentToChild <ParticleSystem>(ref this._gunPar[(int)fleetType], this._cloudPanel[(int)fleetType].get_transform(), "Gun");
                 Util.FindParentToChild <UIPanel>(ref this._labelPanel[(int)fleetType], base.get_transform(), string.Format("{0}LabelPanel", fleetType.ToString()));
                 Util.FindParentToChild <UITexture>(ref this._supremacyTxt[(int)fleetType], this._labelPanel[(int)fleetType].get_transform(), "SupremacyTxt");
             }
         }
     }
     this._labelPanel[1].SetActive(false);
     if (this._iType == CutInType.Both)
     {
         this._labelPanel[0].SetLayer(8);
         this._labelPanel[1].SetLayer(1);
         this._labelPanel[1].SetActive(true);
     }
     else if (this._iType == CutInType.EnemyOnly)
     {
         this._supremacyTxt[0].get_transform().set_localScale(Vector3.get_one());
         this._labelPanel[0].SetLayer(14);
     }
     else if (this._iType == CutInType.FriendOnly)
     {
         this._supremacyTxt[0].get_transform().set_localScale(Vector3.get_one());
         this._labelPanel[0].SetLayer(14);
     }
     this._createAsyncAircrafts();
     return(true);
 }
Ejemplo n.º 30
0
        private void _hitExplosion()
        {
            BattleTaskManager.GetBattleField().AlterWaveDirection(FleetType.Friend);
            BattleTaskManager.GetBattleCameras().cutInCamera.enabled = true;
            if (_isAttack)
            {
                _fieldCam.cameraShake.ShakeRot(null);
            }
            for (int i = 0; i < _defenders.Count; i++)
            {
                DamageModel attackDamage = _clsShelling.GetAttackDamage(_defenders[i].TmpId);
                _battleHpGauges.Show(i, _eHpPos[i], new Vector3(0.35f, 0.35f, 0.35f), isScale: false);
                BattleHPGauges battleHpGauges = _battleHpGauges;
                int            num            = i;
                Vector3        damagePosition = _battleHpGauges.GetDamagePosition(i);
                battleHpGauges.SetDamagePosition(num, new Vector3(damagePosition.x, -525f, 0f));
                _battleHpGauges.PlayHp(i, null);
                if (attackDamage.GetHitState() == BattleHitStatus.Miss)
                {
                    _battleHpGauges.PlayMiss(i);
                }
                else if (attackDamage.GetHitState() == BattleHitStatus.Clitical)
                {
                    _battleHpGauges.PlayCritical(i);
                }
            }
            _setShinking();
            int eCnt = (_listExplosion != null) ? _listExplosion.Count : 0;
            int mCnt = (_listMiss != null) ? _listMiss.Count : 0;

            Observable.FromCoroutine(_playExplosion).Subscribe(delegate
            {
                if (eCnt >= mCnt)
                {
                    _isEx = true;
                }
            });
            Observable.FromCoroutine(_playMissSplash).Subscribe(delegate
            {
                if (mCnt >= eCnt)
                {
                    _isEx = true;
                }
            });
            if (_listExplosion == null && _listMiss == null)
            {
                _isEx = true;
            }
            if ((_listExplosion != null) & (_listExplosion.Count > 0))
            {
                KCV.Utils.SoundUtils.PlaySE(SEFIleInfos.Explode);
            }
            if ((_listMiss != null) & (_listMiss.Count > 0))
            {
                KCV.Utils.SoundUtils.PlaySE(SEFIleInfos.BattleTorpedo);
            }
        }