/// <summary> /// Snaps the follow on the primary and secondary action if they are <see cref="GrabInteractableFollowAction"/> type. /// </summary> public virtual void SnapFollowOrientation() { if (PrimaryAction != null && PrimaryAction.GetType() == typeof(GrabInteractableFollowAction)) { GrabInteractableFollowAction action = (GrabInteractableFollowAction)PrimaryAction; action.ForceSnapOrientation(); } if (SecondaryAction != null && SecondaryAction.GetType() == typeof(GrabInteractableFollowAction)) { GrabInteractableFollowAction action = (GrabInteractableFollowAction)SecondaryAction; action.ForceSnapOrientation(); } }
/// <summary> /// Determines whether the primary grab action is of type <see cref="GrabInteractableNullAction"/>. /// </summary> /// <param name="interactorCount">The amount of grabbing Interactors.</param> /// <returns>Whether the primary grab is of type <see cref="GrabInteractableNullAction"/>.</returns> protected virtual bool PrimaryGrabIsNone(int interactorCount) { return(Facade.GrabbingInteractors.Count > interactorCount && PrimaryAction.GetType() == typeof(GrabInteractableNullAction)); }