private bool InitMoveCameraTo2D(object data)
        {
            BattleFieldCamera       cam                  = BattleTaskManager.GetBattleCameras().fieldCameras.get_Item(0);
            BattleShips             battleShips          = BattleTaskManager.GetBattleShips();
            ProdDetectionStartCutIn pdsc                 = ProdDetectionStartCutIn.Instantiate(BattleTaskManager.GetPrefabFile().prefabProdDetectionStartCutIn.GetComponent <ProdDetectionStartCutIn>(), BattleTaskManager.GetBattleCameras().cutInCamera.get_transform());
            ShipModel_Battle        detectionPrimaryShip = ShipUtils.GetDetectionPrimaryShip(this._clsSakuteki.planes_f, true);
            UIBattleShip            uIBattleShip         = (detectionPrimaryShip == null) ? battleShips.flagShipFriend : battleShips.dicFriendBattleShips.get_Item(detectionPrimaryShip.Index);
            Vector3 vector           = Mathe.NormalizeDirection(uIBattleShip.pointOfGaze, Vector3.get_zero()) * 30f;
            Vector3 fixChasingCamera = new Vector3(uIBattleShip.pointOfGaze.x, uIBattleShip.pointOfGaze.y, uIBattleShip.pointOfGaze.z + vector.z);

            cam.pointOfGaze = uIBattleShip.pointOfGaze;
            cam.ReqViewMode(CameraActor.ViewMode.FixChasing);
            cam.SetFixChasingCamera(fixChasingCamera);
            Vector3   endCamPos = new Vector3(uIBattleShip.pointOfGaze.x, 50f, uIBattleShip.pointOfGaze.z + vector.z * 6f);
            Transform transform = uIBattleShip.get_transform();
            Vector3   position  = BattleTaskManager.GetBattleShips().dicFriendBattleShips.get_Item(0).get_transform().get_position();

            this._psDetectionRipple = Util.Instantiate(ParticleFile.Load(ParticleFileInfos.BattlePSDetectionRipple), null, false, false).GetComponent <ParticleSystem>();
            this._psDetectionRipple.get_transform().set_parent(transform);
            this._psDetectionRipple.get_transform().set_position(new Vector3(position.x, position.y + 0.01f, position.z));
            this._psDetectionRipple.Play();
            pdsc.Play().Subscribe(delegate(bool _)
            {
                cam.get_transform().LTMove(endCamPos, 1.95f).setEase(LeanTweenType.easeInOutCubic);
                Mem.DelComponentSafe <ProdDetectionStartCutIn>(ref pdsc);
            });
            return(false);
        }
예제 #2
0
        private void InitCameraSettingsForEnemyFocus()
        {
            BattleFieldCamera battleFieldCamera = BattleTaskManager.GetBattleCameras().fieldCameras[0];

            battleFieldCamera.transform.LTCancel();
            Vector3 vector = battleFieldCamera.pointOfGaze = BattleTaskManager.GetBattleShips().flagShipEnemy.pointOfGaze;

            battleFieldCamera.ReqViewMode(CameraActor.ViewMode.FixChasing);
            Vector3 fixChasingCamera = CalcCameraFleetFocusPos(_iResult);

            battleFieldCamera.SetFixChasingCamera(fixChasingCamera);
        }
예제 #3
0
        private bool InitMoveCameraTo2D(object data)
        {
            BattleFieldCamera       cam                  = BattleTaskManager.GetBattleCameras().fieldCameras[0];
            BattleShips             battleShips          = BattleTaskManager.GetBattleShips();
            ProdDetectionStartCutIn pdsc                 = ProdDetectionStartCutIn.Instantiate(((Component)BattleTaskManager.GetPrefabFile().prefabProdDetectionStartCutIn).GetComponent <ProdDetectionStartCutIn>(), BattleTaskManager.GetBattleCameras().cutInCamera.transform);
            ShipModel_Battle        detectionPrimaryShip = ShipUtils.GetDetectionPrimaryShip(_clsSakuteki.planes_f, isFriend: true);
            UIBattleShip            uIBattleShip         = (detectionPrimaryShip == null) ? battleShips.flagShipFriend : battleShips.dicFriendBattleShips[detectionPrimaryShip.Index];
            Vector3 vector           = Mathe.NormalizeDirection(uIBattleShip.pointOfGaze, Vector3.zero) * 30f;
            Vector3 pointOfGaze      = uIBattleShip.pointOfGaze;
            float   x                = pointOfGaze.x;
            Vector3 pointOfGaze2     = uIBattleShip.pointOfGaze;
            float   y                = pointOfGaze2.y;
            Vector3 pointOfGaze3     = uIBattleShip.pointOfGaze;
            Vector3 fixChasingCamera = new Vector3(x, y, pointOfGaze3.z + vector.z);

            cam.pointOfGaze = uIBattleShip.pointOfGaze;
            cam.ReqViewMode(CameraActor.ViewMode.FixChasing);
            cam.SetFixChasingCamera(fixChasingCamera);
            Vector3   pointOfGaze4 = uIBattleShip.pointOfGaze;
            float     x2           = pointOfGaze4.x;
            Vector3   pointOfGaze5 = uIBattleShip.pointOfGaze;
            Vector3   endCamPos    = new Vector3(x2, 50f, pointOfGaze5.z + vector.z * 6f);
            Transform transform    = uIBattleShip.transform;
            Vector3   position     = BattleTaskManager.GetBattleShips().dicFriendBattleShips[0].transform.position;

            _psDetectionRipple = Util.Instantiate(ParticleFile.Load(ParticleFileInfos.BattlePSDetectionRipple)).GetComponent <ParticleSystem>();
            ((Component)_psDetectionRipple).transform.parent   = transform;
            ((Component)_psDetectionRipple).transform.position = new Vector3(position.x, position.y + 0.01f, position.z);
            _psDetectionRipple.Play();
            pdsc.Play().Subscribe(delegate
            {
                cam.transform.LTMove(endCamPos, 1.95f).setEase(LeanTweenType.easeInOutCubic);
                Mem.DelComponentSafe(ref pdsc);
            });
            return(false);
        }