Exemplo n.º 1
0
 public override void ResetAction()
 {
     if (currentAction != null)
     {
         currentAction.ResetAction();
         currentAction = null;
     }
 }
Exemplo n.º 2
0
 public override void OnDropAction()
 {
     if (currentAction != null)
     {
         currentAction.OnDropAction();
         currentAction = null;
     }
 }
Exemplo n.º 3
0
 public override void Initialise(VRTK_InteractableObject currentGrabbdObject, VRTK_InteractGrab currentPrimaryGrabbingObject, VRTK_InteractGrab currentSecondaryGrabbingObject, Transform primaryGrabPoint, Transform secondaryGrabPoint)
 {
     currentAction = defaultGrabAction;
     foreach (LocalizedSecondaryGrabAction localizedMechanic in localizedSecondaryGrabMechanics)
     {
         if (localizedMechanic.regionCollider.bounds.Contains(secondaryGrabPoint.position))
         {
             currentAction = localizedMechanic.secondaryGrabMechanic;
             break;
         }
     }
     currentAction.Initialise(currentGrabbdObject, currentPrimaryGrabbingObject, currentSecondaryGrabbingObject, primaryGrabPoint, secondaryGrabPoint);
     base.Initialise(currentGrabbdObject, primaryGrabbingObject, currentSecondaryGrabbingObject, primaryGrabPoint, secondaryGrabPoint);
 }