コード例 #1
0
 public void disableMenuOnTrigger(Transform selectedObject)
 {
     if (bubbleCursor.controllerEvents() == BubbleCursor3D.ControllerState.TRIGGER_DOWN && inBubbleSelection == true)
     {
         print("Selected object:" + selectedObject);
         clearList();
         destroyChildGameObjects();
         pickedObjects = null;
         panel.SetActive(false);
         inBubbleSelection = false;
         imageSlots        = 0;
         if (bubbleCursor != null)
         {
             if (bubbleCursor.cursor != null)
             {
                 bubbleCursor.cursor.SetActive(true);
             }
         }
         if (selectedObject != null)
         {
             selectedObject.GetComponent <Renderer>().material.color = Color.red;
             if (bubbleCursor.interactionType == BubbleCursor3D.InteractionType.Selection)
             {
                 bubbleCursor.lastSelectedObject = selectedObject.gameObject;
             }
             else if (bubbleCursor.interactionType == BubbleCursor3D.InteractionType.Manipulation_Movement)
             {
                 bubbleCursor.lastSelectedObject = selectedObject.gameObject;
                 selectedObject.transform.SetParent(trackedObj.transform);
                 pickedUpObject   = true;
                 tempObjectStored = selectedObject.gameObject;
             }
             else if (bubbleCursor.interactionType == BubbleCursor3D.InteractionType.Manipulation_UI && bubbleCursor.GetComponent <SelectionManipulation>().inManipulationMode == false)
             {
                 bubbleCursor.lastSelectedObject = selectedObject.gameObject;
                 bubbleCursor.GetComponent <SelectionManipulation>().selectedObject = selectedObject.gameObject;
             }
         }
     }
 }