예제 #1
0
 private void OnMouseDown()
 {
     hit = RayCast.CameraRayCast();
     if (hit.collider != null && (gameObjectToAttached.Contains(hit.collider.attachedRigidbody) || hit.collider.tag == "PushRigidByClick"))
     {
         pushRigidBody(hit.collider.attachedRigidbody);
     }
 }
예제 #2
0
 public void ShowMessageOnRayCast()
 {
     hit = RayCast.CameraRayCast();
     if (hit.collider != null &&
         hit.collider.gameObject == gameObject &&
         !UIController.MenuPanel.activeSelf &&
         !UIController.ScrollArea.transform.parent.parent.gameObject.activeSelf)
     {
         ShowOutline();
         if (Input.GetKeyDown(KeyCode.Mouse0))
         {
             UIController.ShowMessage(text);
         }
     }
     else
     {
         HideOutline();
     }
 }