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);
                });
            }
        }
        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);
        }
        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);
        }
        public void Play(Action callBack)
        {
            this._actCallback = callBack;
            BattleCameras     battleCameras = BattleTaskManager.GetBattleCameras();
            BattleFieldCamera fieldCam      = battleCameras.friendFieldCamera;

            this.setFieldCamera();
            this._camTargetPos = this.calcCloseUpCamPos(fieldCam.get_transform().get_position());
            fieldCam.get_transform().MoveTo(this._camTargetPos.get_Item(0), 0.6f, iTween.EaseType.linear, delegate
            {
                fieldCam.motionBlur.set_enabled(false);
                this.PlayProtectDefender();
            });
        }
예제 #5
0
        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
            {
                this.PlayShipAnimation(this._listBattleShips.get_Item(0), UIBattleShip.AnimationName.ProdShellingNormalAttack, 0.4f);
                fieldCam.motionBlur.set_enabled(false);
                fieldCam.get_transform().LTMove(camTargetPos.get_Item(1), BattleDefines.SHELLING_ATTACK_ATTACKER_CLOSEUP_TIME.get_Item(1)).setEase(BattleDefines.SHELLING_ATTACK_ATTACKER_CLOSEUP_EASING_TYPE.get_Item(1)).setOnComplete(delegate
                {
                    this.ChkAttackCntForNextPhase();
                });
            });
            return(false);
        }
예제 #6
0
 private void LateUpdate()
 {
     if (this.animation.get_isPlaying())
     {
         this._traEnemyFleet.set_position(this._strParams.enemyFleetPivot);
         this._traFriendFleet.set_position(this._strParams.friendFleetPivot);
         this._vCameraPos = Vector3.Lerp(this._strParams.cameraStartPivot, this._strParams.cameraEndPivot, Mathe.MinMax2F01(this._strParams.cameraMoveProgress));
         BattleFieldCamera battleFieldCamera = BattleTaskManager.GetBattleCameras().fieldCameras.get_Item(0);
         battleFieldCamera.get_transform().set_position(this._vCameraPos);
     }
 }
예제 #7
0
        protected override void PlayDefenderMiss(UIBattleShip ship, Vector3 defenderPos, BattleFieldCamera fieldCamera)
        {
            KCV.Battle.Utils.SoundUtils.PlayDamageSE(HitState.Miss, true);
            ParticleSystem splashMiss = BattleTaskManager.GetParticleFile().splashMiss;

            splashMiss.get_transform().set_parent(base.particleParent);
            splashMiss.SetLayer(Generics.Layers.UnRefrectEffects.IntLayer(), true);
            splashMiss.get_transform().set_position(Vector3.Lerp(fieldCamera.get_transform().get_position(), defenderPos, 5f));
            splashMiss.get_transform().positionY(0f);
            splashMiss.SetActive(true);
            splashMiss.Play();
            this.PlayHpGaugeDamage(ship, base.hitState);
        }
        public void PlayProtectDefender(BattleFieldCamera cam, FleetType type)
        {
            BattleCameras battleCameras = BattleTaskManager.GetBattleCameras();

            if (type == FleetType.Friend)
            {
                cam.get_transform().MoveTo(this._camTargetPosF.get_Item(1), BattleDefines.SHELLING_ATTACK_DEFENDER_CLOSEUP_TIME.get_Item(1), iTween.EaseType.linear, null);
                Observable.Timer(TimeSpan.FromSeconds(0.42500001192092896)).Subscribe(delegate(long _)
                {
                    cam.get_transform().iTweenStop();
                    Vector3 target = this.calcProtecterPos(this._camTargetPosF.get_Item(3), FleetType.Friend);
                    this._listBattleShipF.get_Item(1).get_transform().positionZ(target.z);
                    this._listBattleShipF.get_Item(1).get_transform().MoveTo(target, BattleDefines.SHELLING_ATTACK_DEFENDER_CLOSEUP_TIME.get_Item(0) * 1.2f, iTween.EaseType.easeOutSine, null);
                    cam.get_transform().MoveTo(this._camTargetPosF.get_Item(2), BattleDefines.SHELLING_ATTACK_DEFENDER_CLOSEUP_TIME.get_Item(0), iTween.EaseType.linear, delegate
                    {
                        cam.get_transform().MoveTo(this._camTargetPosF.get_Item(3), BattleDefines.SHELLING_ATTACK_DEFENDER_CLOSEUP_TIME.get_Item(1), iTween.EaseType.linear, delegate
                        {
                            this._listBattleShipF.ForEach(delegate(UIBattleShip x)
                            {
                                x.standingPositionType = StandingPositionType.OneRow;
                            });
                            this._actCallback.Invoke();
                        });
                    });
                });
            }
            else
            {
                cam.get_transform().MoveTo(this._camTargetPosE.get_Item(1), BattleDefines.SHELLING_ATTACK_DEFENDER_CLOSEUP_TIME.get_Item(1), iTween.EaseType.linear, null);
                Observable.Timer(TimeSpan.FromSeconds(0.42500001192092896)).Subscribe(delegate(long _)
                {
                    cam.get_transform().iTweenStop();
                    Vector3 target = this.calcProtecterPos(this._camTargetPosE.get_Item(3), FleetType.Enemy);
                    this._listBattleShipE.get_Item(1).get_transform().positionZ(target.z);
                    this._listBattleShipE.get_Item(1).get_transform().MoveTo(target, BattleDefines.SHELLING_ATTACK_DEFENDER_CLOSEUP_TIME.get_Item(0) * 1.2f, iTween.EaseType.easeOutSine, null);
                    cam.get_transform().MoveTo(this._camTargetPosE.get_Item(2), BattleDefines.SHELLING_ATTACK_DEFENDER_CLOSEUP_TIME.get_Item(0), iTween.EaseType.linear, delegate
                    {
                        cam.get_transform().MoveTo(this._camTargetPosE.get_Item(3), BattleDefines.SHELLING_ATTACK_DEFENDER_CLOSEUP_TIME.get_Item(1), iTween.EaseType.linear, delegate
                        {
                            this._listBattleShipE.ForEach(delegate(UIBattleShip x)
                            {
                                x.standingPositionType = StandingPositionType.OneRow;
                            });
                            this._actCallback.Invoke();
                        });
                    });
                });
            }
        }
        public void PlayProtectDefender()
        {
            BattleCameras     battleCameras = BattleTaskManager.GetBattleCameras();
            BattleFieldCamera fieldCam      = battleCameras.friendFieldCamera;

            fieldCam.get_transform().MoveTo(this._camTargetPos.get_Item(1), BattleDefines.SHELLING_ATTACK_DEFENDER_CLOSEUP_TIME.get_Item(1), iTween.EaseType.linear, null);
            Observable.Timer(TimeSpan.FromSeconds(0.42500001192092896)).Subscribe(delegate(long _)
            {
                fieldCam.get_transform().iTweenStop();
                Vector3 target = this.calcProtecterPos(this._camTargetPos.get_Item(3));
                this._listBattleShip.get_Item(1).get_transform().positionZ(target.z);
                this._listBattleShip.get_Item(1).get_transform().MoveTo(target, BattleDefines.SHELLING_ATTACK_DEFENDER_CLOSEUP_TIME.get_Item(0) * 1.2f, iTween.EaseType.easeOutSine, null);
                fieldCam.get_transform().MoveTo(this._camTargetPos.get_Item(2), BattleDefines.SHELLING_ATTACK_DEFENDER_CLOSEUP_TIME.get_Item(0), iTween.EaseType.linear, delegate
                {
                    fieldCam.get_transform().MoveTo(this._camTargetPos.get_Item(3), BattleDefines.SHELLING_ATTACK_DEFENDER_CLOSEUP_TIME.get_Item(1), iTween.EaseType.linear, delegate
                    {
                        this._listBattleShip.get_Item(0).standingPositionType = StandingPositionType.OneRow;
                        this._listBattleShip.get_Item(1).standingPositionType = StandingPositionType.OneRow;
                        this._actCallback.Invoke();
                    });
                });
            });
        }
예제 #10
0
        protected override void PlayDefenderGard(UIBattleShip ship, Vector3 defenderPos, BattleFieldCamera fieldCamera)
        {
            ParticleSystem explosionB3WhiteSmoke = BattleTaskManager.GetParticleFile().explosionB3WhiteSmoke;

            explosionB3WhiteSmoke.get_transform().set_parent(base.particleParent);
            explosionB3WhiteSmoke.SetLayer(Generics.Layers.UnRefrectEffects.IntLayer(), true);
            explosionB3WhiteSmoke.get_transform().set_position(Vector3.Lerp(fieldCamera.get_transform().get_position(), defenderPos, 0.9f));
            explosionB3WhiteSmoke.SetActive(true);
            explosionB3WhiteSmoke.Play();
            KCV.Battle.Utils.SoundUtils.PlayDamageSE(HitState.Gard, false);
            base.PlayDamageVoice(ship, this._clsHougekiModel.Defender.DamageEventAfter);
            this.PlayHpGaugeDamage(ship, base.hitState);
            fieldCamera.cameraShake.ShakeRot(null);
        }
        protected override void PlayDefenderCritical(UIBattleShip ship, Vector3 defenderPos, BattleFieldCamera fieldCamera)
        {
            KCV.Utils.SoundUtils.PlaySE(SEFIleInfos.SE_927b);
            ParticleSystem splashMiss = BattleTaskManager.GetParticleFile().splashMiss;

            splashMiss.get_transform().set_parent(base.particleParent);
            splashMiss.SetLayer(Generics.Layers.UnRefrectEffects.IntLayer(), true);
            splashMiss.get_transform().set_position(Vector3.Lerp(fieldCamera.get_transform().get_position(), defenderPos, 0.9f));
            splashMiss.get_transform().positionY(0f);
            splashMiss.SetActive(true);
            splashMiss.Play();
            this.PlayHpGaugeDamage(ship, base.hitState);
            fieldCamera.cameraShake.ShakeRot(null);
            base.PlayDamageVoice(ship, this._clsHougekiModel.Defender.DamageEventAfter);
        }
        protected override bool InitAttackerFocus(object data)
        {
            BattleCameras     battleCameras = BattleTaskManager.GetBattleCameras();
            BattleFieldCamera fieldCam      = battleCameras.fieldCameras.get_Item(0);

            this.SetDimCamera(true, fieldCam.get_transform());
            this.SetFieldCamera(true, this.CalcCamPos(true, false), this._listBattleShips.get_Item(0).spPointOfGaze);
            List <Vector3> camTargetPos = this.CalcCloseUpCamPos(fieldCam.get_transform().get_position(), this.CalcCamTargetPos(true, false), 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(LeanTweenType.easeInQuad).setOnComplete(delegate
            {
                this.PlayShellingSlot(this._clsHougekiModel.GetSlotitems(), BaseProdLine.AnimationName.ProdSuccessiveLine, this._listBattleShips.get_Item(0).shipModel.IsFriend(), 0.033f);
                this.PlayShipAnimation(this._listBattleShips.get_Item(0), UIBattleShip.AnimationName.ProdShellingNormalAttack, 0.4f);
                fieldCam.motionBlur.set_enabled(false);
                fieldCam.get_transform().LTMove(camTargetPos.get_Item(1), BattleDefines.SHELLING_ATTACK_ATTACKER_CLOSEUP_TIME.get_Item(1)).setEase(LeanTweenType.linear).setOnComplete(delegate
                {
                    this.ChkAttackCntForNextPhase();
                });
            });
            return(false);
        }
예제 #13
0
        private void InitCommandBackground()
        {
            BattleField   battleField   = BattleTaskManager.GetBattleField();
            BattleCameras battleCameras = BattleTaskManager.GetBattleCameras();
            BattleShips   battleShips   = BattleTaskManager.GetBattleShips();

            BattleTaskManager.GetPrefabFile().DisposeProdCloud();
            battleField.dicFleetAnchor.get_Item(FleetType.Friend).set_position(Vector3.get_forward() * 100f);
            battleField.dicFleetAnchor.get_Item(FleetType.Enemy).set_position(Vector3.get_back() * 100f);
            BattleFieldCamera battleFieldCamera = battleCameras.fieldCameras.get_Item(0);

            battleFieldCamera.ReqViewMode(CameraActor.ViewMode.RotateAroundObject);
            battleFieldCamera.SetRotateAroundObjectCamera(battleField.fieldCenter.get_position(), 200f, -9.5f);
            battleFieldCamera.get_transform().LTMoveY(15.51957f, 0.01f).setEase(LeanTweenType.easeOutQuart);
            this._uiBlur.set_enabled(true);
            battleShips.RadarDeployment(true);
        }
예제 #14
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  = 1;
            friendFieldCamera.cullingMask = battleCameras.GetDefaultLayers();
            enemyFieldCamera.cullingMask  = battleCameras.GetEnemyCamSplitLayers();
            battleCameras.SetVerticalSplitCameras(true);
            friendFieldCamera.ReqViewMode(CameraActor.ViewMode.NotViewModeCtrl);
            enemyFieldCamera.ReqViewMode(CameraActor.ViewMode.NotViewModeCtrl);
            Vector3 position = battleField.dicCameraAnchors.get_Item(CameraAnchorType.OneRowAnchor).get_Item(FleetType.Friend).get_position();

            friendFieldCamera.get_transform().set_position(new Vector3(-51f, 8f, 90f));
            friendFieldCamera.get_transform().set_localRotation(Quaternion.Euler(new Vector3(10.5f, 70f, 0f)));
            Vector3 position2 = battleField.dicCameraAnchors.get_Item(CameraAnchorType.OneRowAnchor).get_Item(FleetType.Enemy).get_position();

            enemyFieldCamera.get_transform().set_position(new Vector3(-51f, 8f, -90f));
            enemyFieldCamera.get_transform().set_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(false);
            battleShips2.SetBollboardTarget(false, enemyFieldCamera.get_transform());
            battleShips2.SetTorpedoSalvoWakeAngle(true);
            BattleCutInEffectCamera cutInEffectCamera = BattleTaskManager.GetBattleCameras().cutInEffectCamera;
            UITexture component = cutInEffectCamera.get_transform().FindChild("TorpedoLine/OverlayLine").GetComponent <UITexture>();

            if (component != null)
            {
                component.alpha = 1f;
            }
            BattleTaskManager.GetBattleCameras().fieldDimCamera.maskAlpha = 0f;
            using (Dictionary <int, UIBattleShip> .ValueCollection.Enumerator enumerator = BattleTaskManager.GetBattleShips().dicFriendBattleShips.get_Values().GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    UIBattleShip current = enumerator.get_Current();
                    current.billboard.billboardTarget = BattleTaskManager.GetBattleCameras().friendFieldCamera.get_transform();
                }
            }
            using (Dictionary <int, UIBattleShip> .ValueCollection.Enumerator enumerator2 = BattleTaskManager.GetBattleShips().dicEnemyBattleShips.get_Values().GetEnumerator())
            {
                while (enumerator2.MoveNext())
                {
                    UIBattleShip current2 = enumerator2.get_Current();
                    current2.billboard.billboardTarget = BattleTaskManager.GetBattleCameras().enemyFieldCamera.get_transform();
                }
            }
        }