1
0
forked from cgvr/DeltaVR

professor final voice line comes from himself, not radio

This commit is contained in:
2026-03-20 14:50:15 +02:00
parent 398f22efdd
commit 4796869a29
9 changed files with 67 additions and 66 deletions

View File

@@ -31,6 +31,7 @@ namespace _PROJECT.NewHandPresence
private XRControllerHintController _leftHintController;
private XRControllerHintController _rightHintController;
private XRBaseInteractor lastInteractor = null;
private SmartHandPresence _leftSmartHandPresence;
private SmartHandPresence _rightSmartHandPresence;
@@ -244,18 +245,24 @@ namespace _PROJECT.NewHandPresence
StopCoroutine(initializationInfoCoroutine);
}
private void OnGripPerformed(SelectEnterEventArgs arg0)
private void OnGripPerformed(SelectEnterEventArgs args)
{
var grab = arg0.interactableObject as XRGrabInteractable;
// Notify any listeners
OnGrab?.Invoke(grab);
var interactor = args.interactorObject as XRBaseInteractor;
var interactable = args.interactableObject as XRGrabInteractable;
if (_state != TutorialState.Grip) return;
Debug.Log("Grip performed");
UpdateState(_state.Next());
if (lastInteractor == interactor)
return; // same hand grabbing again
lastInteractor = interactor;
OnGrab?.Invoke(interactable as XRGrabInteractable);
if (_state == TutorialState.Grip)
UpdateState(_state.Next());
}
private void OnTeleportPerformed(LocomotionSystem obj)
{
if (_state != TutorialState.Teleport) return;