Ejemplo n.º 1
0
        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;
            }
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
 public void OnNotificationClick(int index)
 {
     TapticManager.Notification((NotificationFeedback)index);
     Debug.LogFormat("notification {0}", index);
 }
Ejemplo n.º 4
0
 public void OnSelectionUpdate()
 {
     TapticManager.Selection();
     Debug.Log("selection");
 }
Ejemplo n.º 5
0
 public void OnImpactClick(int index)
 {
     TapticManager.Impact((ImpactFeedback)index);
     Debug.LogFormat("impact {0}", index);
 }