Esempio n. 1
0
 // Token: 0x060016C6 RID: 5830 RVA: 0x0007AD00 File Offset: 0x00078F00
 protected virtual void CheckUse(GameObject interactingObject)
 {
     if (this.useOnTouchWhen != VRTK_ObjectTouchAutoInteract.AutoInteractions.Never && this.reuseTimer < Time.time)
     {
         VRTK_InteractUse component = interactingObject.GetComponent <VRTK_InteractUse>();
         if (component != null && (this.useOnTouchWhen == VRTK_ObjectTouchAutoInteract.AutoInteractions.NoButtonHeld || (this.useOnTouchWhen == VRTK_ObjectTouchAutoInteract.AutoInteractions.ButtonHeld && component.IsUseButtonPressed())))
         {
             if (!this.interactableObject.holdButtonToUse && this.interactableObject.IsUsing(null))
             {
                 this.interactableObject.ForceStopInteracting();
                 return;
             }
             component.AttemptUse();
         }
     }
 }
Esempio n. 2
0
 protected virtual void CheckUse(GameObject interactingObject)
 {
     if (useOnTouchWhen != AutoInteractions.Never && reuseTimer < Time.time)
     {
         VRTK_InteractUse interactUseScript = interactingObject.GetComponentInChildren <VRTK_InteractUse>();
         if (interactUseScript != null && (useOnTouchWhen == AutoInteractions.NoButtonHeld || (useOnTouchWhen == AutoInteractions.ButtonHeld && interactUseScript.IsUseButtonPressed())))
         {
             if (!interactableObject.holdButtonToUse && interactableObject.IsUsing())
             {
                 interactableObject.ForceStopInteracting();
             }
             else
             {
                 interactUseScript.AttemptUse();
             }
         }
     }
 }