public float PlayAction(Interaction action, Transform pose, AbstractHapticDevice haptics, bool randomizePitch) { if (action == Interaction.None) { return(0); } else { if (haptics != null) { var expr = GetHapticExpressions(action); if (expr != HapticExpression.None) { haptics.Play(expr); } } #if UNITY_MODULES_AUDIO var clips = GetClipCollection(action); var reallyRandomize = randomizePitch && clips?.RandomizeClipPitch == true; var clip = clips?.Random(); if (clip != null) { return(PlayAudioClip(clip, pose, reallyRandomize)); } #endif return(0); } }
public float PlayAction(Interaction action, AbstractHapticDevice haptics) { return(PlayAction(action, camT, haptics, false)); }
public float PlayAction(Interaction action, AbstractHapticDevice haptics, bool randomizePitch) { return(PlayAction(action, camT, haptics, randomizePitch)); }
public float PlayAction(Interaction action, Transform pose, AbstractHapticDevice haptics) { return(PlayAction(action, pose, haptics, false)); }