private bool _init()
 {
     _isEx          = false;
     _isAttack      = false;
     _isProtect     = false;
     _explosionTime = 0f;
     _eHpPos        = null;
     _defenders     = _clsShelling.GetDefenders(is_friend: false);
     _fieldCam      = BattleTaskManager.GetBattleCameras().friendFieldCamera;
     _fieldCam.ReqViewMode(CameraActor.ViewMode.NotViewModeCtrl);
     _rescueCutIn = base.transform.SafeGetComponent <ProdAerialRescueCutIn>();
     _rescueCutIn._init();
     return(true);
 }
Exemple #2
0
        public void Play(Action callBack)
        {
            _actCallback = callBack;
            BattleCameras     battleCameras = BattleTaskManager.GetBattleCameras();
            BattleFieldCamera fieldCam      = battleCameras.friendFieldCamera;

            setFieldCamera();
            _camTargetPos = calcCloseUpCamPos(fieldCam.transform.position);
            fieldCam.transform.MoveTo(_camTargetPos[0], 0.6f, iTween.EaseType.linear, delegate
            {
                fieldCam.motionBlur.enabled = false;
                PlayProtectDefender();
            });
        }
        public Vector3 calcCamTargetPos(bool isPointOfGaze, FleetType type)
        {
            BattleFieldCamera friendFieldCamera  = BattleTaskManager.GetBattleCameras().friendFieldCamera;
            BattleFieldCamera friendFieldCamera2 = BattleTaskManager.GetBattleCameras().friendFieldCamera;

            if (type == FleetType.Friend)
            {
                Vector3 vector = Mathe.NormalizeDirection((!isPointOfGaze) ? this._listBattleShipF.get_Item(0).spPointOfGaze : this._listBattleShipF.get_Item(0).pointOfGaze, friendFieldCamera2.eyePosition) * 10f;
                return((!isPointOfGaze) ? new Vector3(this._listBattleShipF.get_Item(0).spPointOfGaze.x + vector.x, this._listBattleShipF.get_Item(0).spPointOfGaze.y, this._listBattleShipF.get_Item(0).spPointOfGaze.z + vector.z) : new Vector3(this._listBattleShipF.get_Item(0).pointOfGaze.x + vector.x, this._listBattleShipF.get_Item(0).pointOfGaze.y, this._listBattleShipF.get_Item(0).pointOfGaze.z + vector.z));
            }
            Vector3 vector2 = Mathe.NormalizeDirection((!isPointOfGaze) ? this._listBattleShipE.get_Item(0).spPointOfGaze : this._listBattleShipE.get_Item(0).pointOfGaze, friendFieldCamera.eyePosition) * 10f;

            return((!isPointOfGaze) ? new Vector3(this._listBattleShipE.get_Item(0).spPointOfGaze.x + vector2.x, this._listBattleShipE.get_Item(0).spPointOfGaze.y, this._listBattleShipE.get_Item(0).spPointOfGaze.z + vector2.z) : new Vector3(this._listBattleShipE.get_Item(0).pointOfGaze.x + vector2.x, this._listBattleShipE.get_Item(0).pointOfGaze.y, this._listBattleShipE.get_Item(0).pointOfGaze.z + vector2.z));
        }
        protected override bool InitRotateFocus(object data)
        {
            BattleCameras     battleCameras     = BattleTaskManager.GetBattleCameras();
            BattleFieldCamera battleFieldCamera = battleCameras.fieldCameras.get_Item(0);

            battleFieldCamera.motionBlur.set_enabled(false);
            this.GraSubDimCameraMaskAlpha(BattleDefines.SHELLING_ATTACK_ATTACKER_CLOSEUP_TIME.get_Item(0));
            this.RotateFocusTowardsTarget2RotateFieldCam(this._listBattleShips.get_Item(1).spPointOfGaze);
            this.RotateFocusTowardTarget2MoveFieldCam(this._listBattleShips.get_Item(1).spPointOfGaze, delegate
            {
                this._clsState.AddState(new StatementMachine.StatementMachineInitialize(this.InitDefenderFocus), new StatementMachine.StatementMachineUpdate(this.UpdateDefenderFocus));
            });
            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();
            });
        }
        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 bool Initialize(RaigekiModel model, PSTorpedoWake psTorpedo, UITexture line)
 {
     _fieldCam    = BattleTaskManager.GetBattleCameras().friendFieldCamera;
     _isPlaying   = false;
     _isTC        = new bool[2];
     _clsTorpedo  = model;
     _torpedoWake = psTorpedo;
     _centerLine  = line;
     _fPhaseTime  = 0f;
     _stateType   = StateType.None;
     _dicIsAttack = new Dictionary <FleetType, bool>();
     _dicIsAttack.Add(FleetType.Friend, value: false);
     _dicIsAttack.Add(FleetType.Enemy, value: false);
     return(true);
 }
        protected override bool InitDefenderFocusErx(object data)
        {
            BattleCameras     battleCameras     = BattleTaskManager.GetBattleCameras();
            BattleFieldCamera battleFieldCamera = battleCameras.fieldCameras.get_Item(0);

            battleFieldCamera.motionBlur.set_enabled(true);
            this.GraSubDimCameraMaskAlpha(BattleDefines.SHELLING_ATTACK_ATTACKER_CLOSEUP_TIME.get_Item(0));
            Vector3 spPointOfGaze = this._listBattleShips.get_Item(1).spPointOfGaze;

            base.RotateFocusTowardTarget2MoveFieldCam_version2(spPointOfGaze, delegate
            {
                this.OnFinished();
            });
            return(false);
        }
Exemple #9
0
        protected override bool InitDefenderFocusErx(object data)
        {
            BattleCameras     battleCameras     = BattleTaskManager.GetBattleCameras();
            BattleFieldCamera battleFieldCamera = battleCameras.fieldCameras[0];

            battleFieldCamera.motionBlur.enabled = true;
            GraSubDimCameraMaskAlpha(BattleDefines.SHELLING_ATTACK_ATTACKER_CLOSEUP_TIME[0]);
            Vector3 spPointOfGaze = _listBattleShips[1].spPointOfGaze;

            RotateFocusTowardTarget2MoveFieldCam_version2(spPointOfGaze, delegate
            {
                OnFinished();
            });
            return(false);
        }
		public void Initialize(ShienModel_Rai model, PSTorpedoWake torpedoWake)
		{
			_fTime = 0f;
			stateType = StateType.None;
			_clsTorpedo = model;
			_isAttackE = false;
			_camFriend = BattleTaskManager.GetBattleCameras().friendFieldCamera;
			BattleShips battleShips = BattleTaskManager.GetBattleShips();
			battleShips.SetBollboardTarget(isFriend: false, _camFriend.transform);
			_torpedoParticle = torpedoWake;
			BattleTaskManager.GetTaskTorpedoSalvo();
			Transform prefabProdTorpedoResucueCutIn = BattleTaskManager.GetPrefabFile().prefabProdTorpedoResucueCutIn;
			_rescueCutIn = transform.SafeGetComponent<ProdAerialRescueCutIn>();
			_rescueCutIn._init();
		}
Exemple #11
0
 public void PlayProtectDefender(BattleFieldCamera cam, FleetType type)
 {
     BattleTaskManager.GetBattleCameras();
     if (type == FleetType.Friend)
     {
         cam.transform.MoveTo(_camTargetPosF[1], BattleDefines.SHELLING_ATTACK_DEFENDER_CLOSEUP_TIME[1], iTween.EaseType.linear, null);
         Observable.Timer(TimeSpan.FromSeconds(0.42500001192092896)).Subscribe(delegate
         {
             cam.transform.iTweenStop();
             Vector3 target2 = calcProtecterPos(_camTargetPosF[3], FleetType.Friend);
             _listBattleShipF[1].transform.positionZ(target2.z);
             _listBattleShipF[1].transform.MoveTo(target2, BattleDefines.SHELLING_ATTACK_DEFENDER_CLOSEUP_TIME[0] * 1.2f, iTween.EaseType.easeOutSine, null);
             cam.transform.MoveTo(_camTargetPosF[2], BattleDefines.SHELLING_ATTACK_DEFENDER_CLOSEUP_TIME[0], iTween.EaseType.linear, delegate
             {
                 cam.transform.MoveTo(_camTargetPosF[3], BattleDefines.SHELLING_ATTACK_DEFENDER_CLOSEUP_TIME[1], iTween.EaseType.linear, delegate
                 {
                     _listBattleShipF.ForEach(delegate(UIBattleShip x)
                     {
                         x.standingPositionType = StandingPositionType.OneRow;
                     });
                     _actCallback();
                 });
             });
         });
     }
     else
     {
         cam.transform.MoveTo(_camTargetPosE[1], BattleDefines.SHELLING_ATTACK_DEFENDER_CLOSEUP_TIME[1], iTween.EaseType.linear, null);
         Observable.Timer(TimeSpan.FromSeconds(0.42500001192092896)).Subscribe(delegate
         {
             cam.transform.iTweenStop();
             Vector3 target = calcProtecterPos(_camTargetPosE[3], FleetType.Enemy);
             _listBattleShipE[1].transform.positionZ(target.z);
             _listBattleShipE[1].transform.MoveTo(target, BattleDefines.SHELLING_ATTACK_DEFENDER_CLOSEUP_TIME[0] * 1.2f, iTween.EaseType.easeOutSine, null);
             cam.transform.MoveTo(_camTargetPosE[2], BattleDefines.SHELLING_ATTACK_DEFENDER_CLOSEUP_TIME[0], iTween.EaseType.linear, delegate
             {
                 cam.transform.MoveTo(_camTargetPosE[3], BattleDefines.SHELLING_ATTACK_DEFENDER_CLOSEUP_TIME[1], iTween.EaseType.linear, delegate
                 {
                     _listBattleShipE.ForEach(delegate(UIBattleShip x)
                     {
                         x.standingPositionType = StandingPositionType.OneRow;
                     });
                     _actCallback();
                 });
             });
         });
     }
 }
Exemple #12
0
        public void Initialize(ShienModel_Rai model, PSTorpedoWake torpedoWake)
        {
            this._fTime      = 0f;
            this.stateType   = ProdSupportTorpedoP2.StateType.None;
            this._clsTorpedo = model;
            this._isAttackE  = false;
            this._camFriend  = BattleTaskManager.GetBattleCameras().friendFieldCamera;
            BattleShips battleShips = BattleTaskManager.GetBattleShips();

            battleShips.SetBollboardTarget(false, this._camFriend.get_transform());
            this._torpedoParticle = torpedoWake;
            TaskBattleTorpedoSalvo taskTorpedoSalvo = BattleTaskManager.GetTaskTorpedoSalvo();
            Transform prefabProdTorpedoResucueCutIn = BattleTaskManager.GetPrefabFile().prefabProdTorpedoResucueCutIn;

            this._rescueCutIn = this.transform.SafeGetComponent <ProdAerialRescueCutIn>();
            this._rescueCutIn._init();
        }
Exemple #13
0
        private void InitCommandBackground()
        {
            BattleField   battleField   = BattleTaskManager.GetBattleField();
            BattleCameras battleCameras = BattleTaskManager.GetBattleCameras();
            BattleShips   battleShips   = BattleTaskManager.GetBattleShips();

            BattleTaskManager.GetPrefabFile().DisposeProdCloud();
            battleField.dicFleetAnchor[FleetType.Friend].position = Vector3.forward * 100f;
            battleField.dicFleetAnchor[FleetType.Enemy].position  = Vector3.back * 100f;
            BattleFieldCamera battleFieldCamera = battleCameras.fieldCameras[0];

            battleFieldCamera.ReqViewMode(CameraActor.ViewMode.RotateAroundObject);
            battleFieldCamera.SetRotateAroundObjectCamera(battleField.fieldCenter.position, 200f, -9.5f);
            battleFieldCamera.transform.LTMoveY(15.51957f, 0.01f).setEase(LeanTweenType.easeOutQuart);
            _uiBlur.enabled = true;
            battleShips.RadarDeployment(isDeploy: true);
        }
Exemple #14
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);
        }
 public void setFieldCamera(BattleFieldCamera camF, BattleFieldCamera camE)
 {
     if (this._isProtect[0])
     {
         Vector3 calcDefenderCamStartPosF = this.calcDefenderCamStartPosF;
         camF.motionBlur.set_enabled(true);
         camF.LookAt(this._listBattleShipF.get_Item(0).spPointOfGaze);
         camF.ReqViewMode(CameraActor.ViewMode.NotViewModeCtrl);
     }
     if (this._isProtect[1])
     {
         Vector3 calcDefenderCamStartPosE = this.calcDefenderCamStartPosE;
         camE.motionBlur.set_enabled(true);
         camE.LookAt(this._listBattleShipE.get_Item(0).spPointOfGaze);
         camE.ReqViewMode(CameraActor.ViewMode.NotViewModeCtrl);
     }
 }
Exemple #16
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);
        }
Exemple #17
0
        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
            {
                PlayShipAnimation(_listBattleShips[0], UIBattleShip.AnimationName.ProdShellingNormalAttack, 0.4f);
                fieldCam.motionBlur.enabled = false;
                fieldCam.transform.LTMove(camTargetPos[1], BattleDefines.SHELLING_ATTACK_ATTACKER_CLOSEUP_TIME[1]).setEase(BattleDefines.SHELLING_ATTACK_ATTACKER_CLOSEUP_EASING_TYPE[1]).setOnComplete((Action) delegate
                {
                    ChkAttackCntForNextPhase();
                });
            });
            return(false);
        }
Exemple #18
0
        private bool _init()
        {
            _isAnimeFinished = false;
            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;
                }
                if (_uiAircraft[i] == null)
                {
                    _uiAircraft[i] = ((Component)_uiAirObj[i].transform.FindChild("Swing/Aircraft")).GetComponent <UITexture>();
                }
                _airAnimation[i] = _uiAircraft[i].GetComponent <Animation>();
            }
            _uiShipObj = new GameObject[2];
            _uiShip    = new UITexture[2];
            for (int j = 0; j < 2; j++)
            {
                if (_uiShipObj[j] == null)
                {
                    _uiShipObj[j] = base.transform.FindChild("ShipObj" + (j + 1)).gameObject;
                }
                if (_uiShip[j] == null)
                {
                    _uiShip[j] = ((Component)_uiShipObj[j].transform.FindChild("Ship")).GetComponent <UITexture>();
                }
            }
            if ((UnityEngine.Object)_cloudParticle == null)
            {
                _cloudParticle = ((Component)base.transform.FindChild("Cloud")).GetComponent <ParticleSystem>();
            }
            _camFieldCamera = BattleTaskManager.GetBattleCameras().friendFieldCamera;
            _camFieldCamera.ReqViewMode(CameraActor.ViewMode.NotViewModeCtrl);
            return(true);
        }
Exemple #19
0
        private bool _init()
        {
            this._isAnimeFinished = false;
            GameObject gameObject = base.get_transform().FindChild("Aircraft").get_gameObject();

            this._uiAirObj     = new GameObject[3];
            this._uiAircraft   = new UITexture[3];
            this._airAnimation = new Animation[3];
            for (int i = 0; i < 3; i++)
            {
                if (this._uiAirObj[i] == null)
                {
                    this._uiAirObj[i] = gameObject.get_transform().FindChild("Aircraft" + (i + 1)).get_gameObject();
                }
                if (this._uiAircraft[i] == null)
                {
                    this._uiAircraft[i] = this._uiAirObj[i].get_transform().FindChild("Swing/Aircraft").GetComponent <UITexture>();
                }
                this._airAnimation[i] = this._uiAircraft[i].GetComponent <Animation>();
            }
            this._uiShipObj = new GameObject[2];
            this._uiShip    = new UITexture[2];
            for (int j = 0; j < 2; j++)
            {
                if (this._uiShipObj[j] == null)
                {
                    this._uiShipObj[j] = base.get_transform().FindChild("ShipObj" + (j + 1)).get_gameObject();
                }
                if (this._uiShip[j] == null)
                {
                    this._uiShip[j] = this._uiShipObj[j].get_transform().FindChild("Ship").GetComponent <UITexture>();
                }
            }
            if (this._cloudParticle == null)
            {
                this._cloudParticle = base.get_transform().FindChild("Cloud").GetComponent <ParticleSystem>();
            }
            this._camFieldCamera = BattleTaskManager.GetBattleCameras().friendFieldCamera;
            this._camFieldCamera.ReqViewMode(CameraActor.ViewMode.NotViewModeCtrl);
            return(true);
        }
Exemple #20
0
        public void setFieldCamera(BattleFieldCamera camF, BattleFieldCamera camE)
        {
            if (_isProtect[0])
            {
                throw new NotImplementedException("なにこれ");
                // Vector3 calcDefenderCamStartPosF = calcDefenderCamStartPosF;

                camF.motionBlur.enabled = true;
                camF.LookAt(_listBattleShipF[0].spPointOfGaze);
                camF.ReqViewMode(CameraActor.ViewMode.NotViewModeCtrl);
            }
            if (_isProtect[1])
            {
                throw new NotImplementedException("なにこれ");
                // Vector3 calcDefenderCamStartPosE = calcDefenderCamStartPosE;

                camE.motionBlur.enabled = true;
                camE.LookAt(_listBattleShipE[0].spPointOfGaze);
                camE.ReqViewMode(CameraActor.ViewMode.NotViewModeCtrl);
            }
        }
        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();
                    });
                });
            });
        }
Exemple #22
0
        public void PlayProtectDefender()
        {
            BattleCameras     battleCameras = BattleTaskManager.GetBattleCameras();
            BattleFieldCamera fieldCam      = battleCameras.friendFieldCamera;

            fieldCam.transform.MoveTo(_camTargetPos[1], BattleDefines.SHELLING_ATTACK_DEFENDER_CLOSEUP_TIME[1], iTween.EaseType.linear, null);
            Observable.Timer(TimeSpan.FromSeconds(0.42500001192092896)).Subscribe(delegate
            {
                fieldCam.transform.iTweenStop();
                Vector3 target = calcProtecterPos(_camTargetPos[3]);
                _listBattleShip[1].transform.positionZ(target.z);
                _listBattleShip[1].transform.MoveTo(target, BattleDefines.SHELLING_ATTACK_DEFENDER_CLOSEUP_TIME[0] * 1.2f, iTween.EaseType.easeOutSine, null);
                fieldCam.transform.MoveTo(_camTargetPos[2], BattleDefines.SHELLING_ATTACK_DEFENDER_CLOSEUP_TIME[0], iTween.EaseType.linear, delegate
                {
                    fieldCam.transform.MoveTo(_camTargetPos[3], BattleDefines.SHELLING_ATTACK_DEFENDER_CLOSEUP_TIME[1], iTween.EaseType.linear, delegate
                    {
                        _listBattleShip[0].standingPositionType = StandingPositionType.OneRow;
                        _listBattleShip[1].standingPositionType = StandingPositionType.OneRow;
                        _actCallback();
                    });
                });
            });
        }
Exemple #23
0
        protected override bool InitAttackerFocus(object data)
        {
            BattleCameras     battleCameras = BattleTaskManager.GetBattleCameras();
            BattleFieldCamera fieldCam      = battleCameras.fieldCameras[0];

            SetDimCamera(isAttacker: true, fieldCam.transform);
            SetFieldCamera(isAttacker: true, CalcCamPos(isAttacker: true, isPointOfGaze: false), _listBattleShips[0].spPointOfGaze);
            List <Vector3> camTargetPos = CalcCloseUpCamPos(fieldCam.transform.position, CalcCamTargetPos(isAttacker: true, isPointOfGaze: false), 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(LeanTweenType.easeInQuad).setOnComplete((Action) delegate
            {
                PlayShellingSlot(_clsHougekiModel.GetSlotitems(), BaseProdLine.AnimationName.ProdSuccessiveLine, _listBattleShips[0].shipModel.IsFriend(), 0.033f);
                PlayShipAnimation(_listBattleShips[0], UIBattleShip.AnimationName.ProdShellingNormalAttack, 0.4f);
                fieldCam.motionBlur.enabled = false;
                fieldCam.transform.LTMove(camTargetPos[1], BattleDefines.SHELLING_ATTACK_ATTACKER_CLOSEUP_TIME[1]).setEase(LeanTweenType.linear).setOnComplete((Action) delegate
                {
                    ChkAttackCntForNextPhase();
                });
            });
            return(false);
        }
        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);
        }
        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 void PlayDefenderMiss(UIBattleShip ship, Vector3 defenderPos, BattleFieldCamera fieldCamera)
        {
            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();
            KCV.Battle.Utils.SoundUtils.PlayDamageSE(HitState.Miss, true);
            this.PlayHpGaugeDamage(ship, base.hitState);
            fieldCamera.cameraShake.ShakeRot(null);
        }
Exemple #27
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);
        }
Exemple #28
0
        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];
            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");
                    }
                }
            }
            bool flag  = false;
            bool flag2 = false;

            if (this._clsAerial.IsBakugeki_f() || this._clsAerial.IsRaigeki_f())
            {
                flag = true;
            }
            if (this._clsAerial.IsBakugeki_e() || this._clsAerial.IsRaigeki_e())
            {
                flag2 = true;
            }
            if (flag && flag2)
            {
                this._iType = CutInType.Both;
            }
            else if (flag && !flag2)
            {
                this._iType = CutInType.FriendOnly;
            }
            BattleCameras           battleCameras     = BattleTaskManager.GetBattleCameras();
            BattleCutInCamera       cutInCamera       = battleCameras.cutInCamera;
            BattleCutInEffectCamera cutInEffectCamera = BattleTaskManager.GetBattleCameras().cutInEffectCamera;

            if (this._iType == CutInType.Both)
            {
                battleCameras.SetSplitCameras2D(true);
                cutInCamera.isCulling       = true;
                cutInEffectCamera.isCulling = true;
            }
            else if (this._iType == CutInType.FriendOnly)
            {
                cutInCamera.isCulling       = true;
                cutInEffectCamera.isCulling = true;
            }
            Observable.FromCoroutine(new Func <IEnumerator>(this._createAsyncAircrafts), false).Subscribe(delegate(Unit _)
            {
            });
            return(true);
        }
Exemple #29
0
        protected override void PlayDefenderGard(UIBattleShip ship, Vector3 defenderPos, BattleFieldCamera fieldCamera)
        {
            ParticleSystem splashMiss = BattleTaskManager.GetParticleFile().splashMiss;

            ((Component)splashMiss).transform.parent = base.particleParent;
            ((Component)splashMiss).SetLayer(Generics.Layers.UnRefrectEffects.IntLayer(), includeChildren: true);
            ((Component)splashMiss).transform.position = Vector3.Lerp(fieldCamera.transform.position, defenderPos, 0.9f);
            ((Component)splashMiss).transform.positionY();
            ((Component)splashMiss).SetActive(isActive: true);
            splashMiss.Play();
            KCV.Battle.Utils.SoundUtils.PlayDamageSE(HitState.Gard, isTorpedo: true);
            PlayDamageVoice(ship, _clsHougekiModel.Defender.DamageEventAfter);
            PlayHpGaugeDamage(ship, base.hitState);
            fieldCamera.cameraShake.ShakeRot(null);
        }
Exemple #30
0
        protected override void PlayDefenderMiss(UIBattleShip ship, Vector3 defenderPos, BattleFieldCamera fieldCamera)
        {
            KCV.Battle.Utils.SoundUtils.PlayDamageSE(HitState.Miss, isTorpedo: true);
            ParticleSystem splashMiss = BattleTaskManager.GetParticleFile().splashMiss;

            ((Component)splashMiss).transform.parent = base.particleParent;
            ((Component)splashMiss).SetLayer(Generics.Layers.UnRefrectEffects.IntLayer(), includeChildren: true);
            ((Component)splashMiss).transform.position = Vector3.Lerp(fieldCamera.transform.position, defenderPos, 5f);
            ((Component)splashMiss).transform.positionY();
            ((Component)splashMiss).SetActive(isActive: true);
            splashMiss.Play();
            PlayHpGaugeDamage(ship, base.hitState);
        }