コード例 #1
0
    public void HapticFeedback(NativeUtils.FeedbackType type)
    {
        switch (type)
        {
        case NativeUtils.FeedbackType.ImpactLight:
            hapticFeedbackImpact(1);
            break;

        case NativeUtils.FeedbackType.ImpactMedium:
            hapticFeedbackImpact(5);
            break;

        case NativeUtils.FeedbackType.ImpactHeavy:
            hapticFeedbackImpact(10);
            break;

        case NativeUtils.FeedbackType.NotificationSuccess:
            hapticFeedbackWave(new long[] { 0, 5, 100, 5 });
            break;

        case NativeUtils.FeedbackType.NotificationWarning:
            hapticFeedbackWave(new long[] { 0, 5, 200, 5 });
            break;

        case NativeUtils.FeedbackType.NotificationError:
            hapticFeedbackWave(new long[] { 0, 5, 50, 5, 50, 5 });
            break;

        case NativeUtils.FeedbackType.Selection:
            hapticFeedbackImpact(1);
            break;
        }
    }
コード例 #2
0
 private static extern void _NativeUtils_hapticfeedback(NativeUtils.FeedbackType type);
コード例 #3
0
 public void HapticFeedback(NativeUtils.FeedbackType type)
 {
     _NativeUtils_hapticfeedback(type);
 }
コード例 #4
0
 public void HapticFeedback(NativeUtils.FeedbackType type)
 {
 }
コード例 #5
0
 public static void HapticFeedback(NativeUtils.FeedbackType type)
 {
     plugin.HapticFeedback(type);
 }