void Update() { if (Input.GetKeyDown(KeyCode.E)) { if (_useableObject != null && Time.time >= _lastUseTime + _useWaitTime) { _lastUseTime = Time.time; if (_useableObject.CanBeUsed(this)) { _useableObject.OnUse(this); _externalUseEnd = _useableObject.HasExternalUseEnd(); _using = true; if (_cameraMover != null) { _playerScript.enabled = false; _cameraMover.ZoomCameraIn(_useableGameObject.transform); _interactionCanvasInstance.SetActive(false); Cursor.lockState = CursorLockMode.None; Cursor.visible = true; } } else if (_using && !_externalUseEnd) { _useableObject.OnEndUse(this); EndUse(); } } } }