forked from cgvr/DeltaVR
professor final voice line comes from himself, not radio
This commit is contained in:
@@ -168,20 +168,14 @@ public class TutorialAudioListener : MonoBehaviour
|
||||
|
||||
private EventReference GetGrabEvent(GrabSoundType type)
|
||||
{
|
||||
switch (type)
|
||||
return type switch
|
||||
{
|
||||
case GrabSoundType.Bow:
|
||||
return FMODEvents.Instance.BowGrab;
|
||||
|
||||
case GrabSoundType.Sprayer:
|
||||
return FMODEvents.Instance.SprayerGrab;
|
||||
|
||||
GrabSoundType.Bow => FMODEvents.Instance.BowGrab,
|
||||
GrabSoundType.Sprayer => FMODEvents.Instance.SprayerGrab,
|
||||
//Add more objects for grabbing here and do not forget to define them in FMODEvents.cs
|
||||
//Add the GrabAudioProfile.cs component to an object instance
|
||||
|
||||
default:
|
||||
return FMODEvents.Instance.DefaultGrab;
|
||||
}
|
||||
_ => FMODEvents.Instance.DefaultGrab,
|
||||
};
|
||||
}
|
||||
|
||||
private void HandleGrab(XRGrabInteractable grab)
|
||||
@@ -195,10 +189,6 @@ public class TutorialAudioListener : MonoBehaviour
|
||||
: GrabSoundType.Default;
|
||||
|
||||
EventReference grabEvent = GetGrabEvent(type);
|
||||
Debug.Log(grabEvent);
|
||||
AudioManager.Instance.PlayAttachedInstance(grabEvent, grab.gameObject);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -171,7 +171,7 @@ public class ShapeDetectionNPC : NPCController
|
||||
state = 8;
|
||||
staticRadio.SetActive(false);
|
||||
questMarker.gameObject.SetActive(false);
|
||||
SpeakVoiceLine(7, radio.gameObject, 0);
|
||||
SpeakVoiceLine(7, gameObject, 0);
|
||||
await Task.Delay(6500);
|
||||
MoveToNextPoint(0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user