Beispiel #1
0
 protected virtual bool CanRelease()
 {
     if (grabbedObject != null)
     {
         VRTK_InteractableObject objectToGrabScript = grabbedObject.GetComponent <VRTK_InteractableObject>();
         return(objectToGrabScript != null && objectToGrabScript.IsDroppable());
     }
     return(false);
 }
Beispiel #2
0
 protected virtual GameObject GetUndroppableObject()
 {
     if (grabbedObject != null)
     {
         VRTK_InteractableObject grabbedObjectScript = grabbedObject.GetComponent <VRTK_InteractableObject>();
         return(grabbedObjectScript != null && !grabbedObjectScript.IsDroppable() ? grabbedObject : null);
     }
     return(null);
 }
Beispiel #3
0
 // Token: 0x060015AA RID: 5546 RVA: 0x00076F30 File Offset: 0x00075130
 protected virtual bool CanRelease()
 {
     if (this.grabbedObject != null)
     {
         VRTK_InteractableObject component = this.grabbedObject.GetComponent <VRTK_InteractableObject>();
         return(component != null && component.IsDroppable());
     }
     return(false);
 }
Beispiel #4
0
        // Token: 0x060015A4 RID: 5540 RVA: 0x00076D80 File Offset: 0x00074F80
        protected virtual GameObject GetUndroppableObject()
        {
            if (!(this.grabbedObject != null))
            {
                return(null);
            }
            VRTK_InteractableObject component = this.grabbedObject.GetComponent <VRTK_InteractableObject>();

            if (!(component != null) || component.IsDroppable())
            {
                return(null);
            }
            return(this.grabbedObject);
        }
Beispiel #5
0
 protected virtual void SetUndroppableObject()
 {
     if (undroppableGrabbedObject != null)
     {
         VRTK_InteractableObject undroppableGrabbedObjectScript = undroppableGrabbedObject.GetComponent <VRTK_InteractableObject>();
         if (undroppableGrabbedObjectScript != null && undroppableGrabbedObjectScript.IsDroppable())
         {
             undroppableGrabbedObject = null;
         }
         else
         {
             undroppableGrabbedObject.SetActive(false);
         }
     }
 }