コード例 #1
0
 public static void Vibrate(UIFeedbackType type)
 {
     if (vibrator != null)
     {
         vibrator.Vibrate(type);
     }
 }
コード例 #2
0
    public void Vibrate(UIFeedbackType type)
    {
        switch (type)
        {
        case UIFeedbackType.ImpactLight:
            AndroidVibrationPlugin.Vibrate(30, 160);
            break;

        case UIFeedbackType.ImpactMedium:
            AndroidVibrationPlugin.Vibrate(30, 210);
            break;

        case UIFeedbackType.ImpactHeavy:
            AndroidVibrationPlugin.Vibrate(50, 255);
            break;
        }
    }
コード例 #3
0
        public static void Generate(UIFeedbackType type)
        {
#if UNITY_IPHONE && !UNITY_EDITOR
            GenerateFeedback((int)type);
#endif
        }
コード例 #4
0
 internal void Vibrate(UIFeedbackType vibrationType)
 {
     HapticFeedback.Vibrate(vibrationType);
 }
コード例 #5
0
 public void Vibrate(UIFeedbackType type)
 {
     GenerateFeedback((int)type);
 }