Esempio n. 1
0
 private void OnMouseDown()
 {
     if (!isLocked && !EventSystem.current.IsPointerOverGameObject() && distanceChecker.IsInRange())
     {
         _doorAnim.SetBool("isOpening", !_doorAnim.GetBool("isOpening"));
     }
 }
 private void OnMouseDown()
 {
     if (!EventSystem.current.IsPointerOverGameObject() && distanceChecker.IsInRange() && !isMoving && !io.IsInteractive())
     {
         this.originalPosistion             = new Vector3(playerCamera.transform.position.x, playerCamera.transform.position.y, playerCamera.transform.position.z);
         this.originalDirection             = new Quaternion(playerCamera.transform.rotation.x, playerCamera.transform.rotation.y, playerCamera.transform.rotation.z, playerCamera.transform.rotation.w);
         playerCamera.enabled               = false;
         controledCamera.enabled            = true;
         controledCamera.transform.position = originalPosistion;
         controledCamera.transform.rotation = originalDirection;
         isMoving = true;
         disableUI.SetActive(false);
         currentTime = startTime = Time.time;
         slerpValue  = 0;
     }
 }
 private void OnMouseDown()
 {
     if (this.IsInteractive() && !EventSystem.current.IsPointerOverGameObject() && distanceChecker.IsInRange())
     {
         door.Unlock();
         door.Open();
     }
 }