Beispiel #1
0
 public override void ResetAction()
 {
     if (currentAction != null)
     {
         currentAction.ResetAction();
         currentAction = null;
     }
 }
Beispiel #2
0
 public override void OnDropAction()
 {
     if (currentAction != null)
     {
         currentAction.OnDropAction();
         currentAction = null;
     }
 }
Beispiel #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);
 }