void Update() { if (status.status == 1) { float fov = Camera.main.fieldOfView; fov -= Input.mouseScrollDelta.y * sensitivity; fov = Mathf.Clamp(fov, minFov, maxFov); Camera.main.fieldOfView = fov; if (fov == minFov) { //Cat.SetFloat("Action", 1); status.status = 2; cursorController.SetScrollHint(false); findSomethingSound.Play(); } } if (status.status == 2) { float fov = Camera.main.fieldOfView; fov -= Input.mouseScrollDelta.y * sensitivity; fov = Mathf.Clamp(fov, minFov, maxFov); Camera.main.fieldOfView = fov; if (fov >= Jay) { Camera.main.fieldOfView = Jay; status.status = 3; } } }
// Update is called once per frame void OnMouseUp() { y = Input.mousePosition.x; z = x - y; q = y - x; if (z >= Distance && Status.status == 0) { DoorMovement.SetBool("MoveDoor", true); Status.status = 1; cursorController.SetScrollHint(true); doorOpenSound.Play(); } if (q >= Distance && Status.status == 5) { DoorMovement.SetBool("MoveDoor", false); } }