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