예제 #1
0
        public void MoveToPosition(Vector3 position)
        {
            Debug.Log($"Move to: {position}");
            transform.position = position;

            _newPosition = transform.position;
            _newZoom     = new Vector3(0, minZoom, -minZoom);

            CameraEventManager.CameraPositionChanged(new Vector3(_newPosition.x, _newZoom.y, _newPosition.z));
        }
예제 #2
0
        public void Update()
        {
            if (_ready)
            {
                _cameraInputHandler.HandleInput();

                while (_commands.Count > 0)
                {
                    _commands.Dequeue().Execute();
                    CameraEventManager.CameraPositionChanged(new Vector3(_newPosition.x, _newZoom.y, _newPosition.z));
                }
                UpdateCameraAndEnsureBounds();
            }
        }
예제 #3
0
 public void SetNewPosition(Vector3 vector3)
 {
     _newPosition = vector3;
     CameraEventManager.CameraPositionChanged(new Vector3(_newPosition.x, _newZoom.y, _newPosition.z));
 }