private void StartCameraShaking() { _multipleTargetCamera.SetUpdateStatus(false); float cameraShakingOffsetX = Random.value * _shakeMagnitude * 2 - _shakeMagnitude; //float cameraShakingOffsetY = Random.value * _shakeMagnitude * 2 - _shakeMagnitude; Vector3 cameraIntermadiatePosition = _camera.transform.position; cameraIntermadiatePosition.x += cameraShakingOffsetX; // cameraIntermadiatePosition.y += cameraShakingOffsetY; _camera.transform.position = cameraIntermadiatePosition; }
private void OnMouseDown() { _multipleTargetCamera.SetUpdateStatus(false); _isStoped = false; _mouseZCoord = Camera.main.WorldToScreenPoint(gameObject.transform.position).z; _mouseOffset = gameObject.transform.position - GetMouseAsWorldPoint(); if (_arrow.gameObject.activeInHierarchy) { _arrow.gameObject.SetActive(false); } }