void LoadScene() { switch (feedback) { case Feedback.NotificationSuccess: TapticManager.Notification(NotificationFeedback.Success); break; case Feedback.NotificationWarning: TapticManager.Notification(NotificationFeedback.Warning); break; case Feedback.NorificationError: TapticManager.Notification(NotificationFeedback.Error); break; case Feedback.ImpactLight: TapticManager.Impact(ImpactFeedback.Light); break; case Feedback.ImpactMidium: TapticManager.Impact(ImpactFeedback.Midium); break; case Feedback.ImpactHeavy: TapticManager.Impact(ImpactFeedback.Heavy); break; case Feedback.Selection: TapticManager.Selection(); break; } }
void OnCollisionEnter(Collision collision) { float volume = collision.relativeVelocity.magnitude; audioSource.PlayOneShot(se, volume); Debug.LogFormat("hit :{0}", volume); ImpactFeedback feedback; if (volume < 2) { feedback = ImpactFeedback.Light; } else if (volume < 5) { feedback = ImpactFeedback.Medium; } else { feedback = ImpactFeedback.Heavy; } TapticManager.Impact(feedback); }
public void OnNotificationClick(int index) { TapticManager.Notification((NotificationFeedback)index); Debug.LogFormat("notification {0}", index); }
public void OnSelectionUpdate() { TapticManager.Selection(); Debug.Log("selection"); }
public void OnImpactClick(int index) { TapticManager.Impact((ImpactFeedback)index); Debug.LogFormat("impact {0}", index); }