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)); }
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(); } }
public void SetNewPosition(Vector3 vector3) { _newPosition = vector3; CameraEventManager.CameraPositionChanged(new Vector3(_newPosition.x, _newZoom.y, _newPosition.z)); }