![]() |
Interhaptics SDK for Unity 1.6
|
Classes | |
class | PredefinedEffect |
Public Types | |
enum | logLevel { Disabled , Info , Warning } |
Static Public Member Functions | |
static void | Initialize () |
static void | Vibrate (long milliseconds, int amplitude=-1, bool cancel=false) |
Vibrate for Milliseconds, with Amplitude (if available). If amplitude is -1, amplitude is Disabled. If -1, device DefaultAmplitude is used. Otherwise, values between 1-255 are allowed. If 'cancel' is true, Cancel() will be called automatically. | |
static void | Vibrate (long[] pattern, int[] amplitudes=null, int repeat=-1, bool cancel=false) |
Vibrate Pattern (pattern of durations, with format Off-On-Off-On and so on). Amplitudes can be Null (for default) or array of Pattern array length with values between 1-255. To cause the pattern to repeat, pass the index into the pattern array at which to start the repeat, or -1 to disable repeating. If 'cancel' is true, Cancel() will be called automatically. | |
static void | VibratePredefined (int effectId, bool cancel=false) |
Vibrate predefined effect (described in Vibration.PredefinedEffect). Available from Api Level >= 29. If 'cancel' is true, Cancel() will be called automatically. | |
static float | PulseFromBuffer (int[] _buffer) |
static long[] | ParsePattern (string pattern) |
static long[] | TimingsFromAmplitudes (int[] amplitudes, long amplitudeDuration) |
static int | GetApiLevel () |
Returns Android Api Level. | |
static int | GetDefaultAmplitude () |
Returns Default Amplitude of device, or 0. | |
static bool | HasVibrator () |
Returns true if device has vibrator. | |
static bool | HasAmplitudeControl () |
Return true if device supports amplitude control. | |
static void | Cancel () |
Tries to cancel current vibration. | |
Static Public Attributes | |
static logLevel | LogLevel = logLevel.Warning |
static int | AmplitudeThreshold = 100 |
Definition at line 9 of file GenericAndroidHapticAbstraction.cs.
Enumerator | |
---|---|
Disabled | |
Info | |
Warning |
Definition at line 464 of file GenericAndroidHapticAbstraction.cs.
|
static |
Tries to cancel current vibration.
Definition at line 333 of file GenericAndroidHapticAbstraction.cs.
References Interhaptics.Platforms.Mobile.GenericAndroidHapticAbstraction.HasVibrator().
Referenced by Interhaptics.Samples.HapticEffectCodeTester.StopMobileHaptics(), Interhaptics.Platforms.Mobile.GenericAndroidHapticAbstraction.Vibrate(), Interhaptics.Platforms.Mobile.GenericAndroidHapticAbstraction.Vibrate(), and Interhaptics.Platforms.Mobile.GenericAndroidHapticAbstraction.VibratePredefined().
|
static |
Returns Android Api Level.
|
static |
Returns Default Amplitude of device, or 0.
|
static |
Return true if device supports amplitude control.
Definition at line 318 of file GenericAndroidHapticAbstraction.cs.
References Interhaptics.Platforms.Mobile.GenericAndroidHapticAbstraction.HasVibrator().
Referenced by Interhaptics.Platforms.Mobile.GenericAndroidHapticAbstraction.Vibrate(), and Interhaptics.Platforms.Mobile.GenericAndroidHapticAbstraction.Vibrate().
|
static |
Returns true if device has vibrator.
Definition at line 310 of file GenericAndroidHapticAbstraction.cs.
Referenced by Interhaptics.Platforms.Mobile.GenericAndroidHapticAbstraction.Cancel(), Interhaptics.Platforms.Mobile.GenericAndroidHapticAbstraction.HasAmplitudeControl(), Interhaptics.Platforms.Mobile.GenericAndroidHapticAbstraction.Vibrate(), Interhaptics.Platforms.Mobile.GenericAndroidHapticAbstraction.Vibrate(), and Interhaptics.Platforms.Mobile.GenericAndroidHapticAbstraction.VibratePredefined().
|
static |
Definition at line 31 of file GenericAndroidHapticAbstraction.cs.
Referenced by Interhaptics.Platforms.Mobile.GenericAndroidHapticAbstraction.Vibrate(), Interhaptics.Platforms.Mobile.GenericAndroidHapticAbstraction.Vibrate(), and Interhaptics.Platforms.Mobile.GenericAndroidHapticAbstraction.VibratePredefined().
|
static |
Definition at line 237 of file GenericAndroidHapticAbstraction.cs.
|
static |
Definition at line 221 of file GenericAndroidHapticAbstraction.cs.
|
static |
Definition at line 262 of file GenericAndroidHapticAbstraction.cs.
References Interhaptics.Platforms.Mobile.GenericAndroidHapticAbstraction.AmplitudeThreshold.
Referenced by Interhaptics.Platforms.Mobile.GenericAndroidHapticAbstraction.Vibrate().
|
static |
Vibrate for Milliseconds, with Amplitude (if available). If amplitude is -1, amplitude is Disabled. If -1, device DefaultAmplitude is used. Otherwise, values between 1-255 are allowed. If 'cancel' is true, Cancel() will be called automatically.
Definition at line 87 of file GenericAndroidHapticAbstraction.cs.
References Interhaptics.Platforms.Mobile.GenericAndroidHapticAbstraction.Cancel(), Interhaptics.Platforms.Mobile.GenericAndroidHapticAbstraction.HasAmplitudeControl(), Interhaptics.Platforms.Mobile.GenericAndroidHapticAbstraction.HasVibrator(), and Interhaptics.Platforms.Mobile.GenericAndroidHapticAbstraction.Initialize().
|
static |
Vibrate Pattern (pattern of durations, with format Off-On-Off-On and so on). Amplitudes can be Null (for default) or array of Pattern array length with values between 1-255. To cause the pattern to repeat, pass the index into the pattern array at which to start the repeat, or -1 to disable repeating. If 'cancel' is true, Cancel() will be called automatically.
Definition at line 138 of file GenericAndroidHapticAbstraction.cs.
References Interhaptics.Platforms.Mobile.GenericAndroidHapticAbstraction.Cancel(), Interhaptics.Platforms.Mobile.GenericAndroidHapticAbstraction.HasAmplitudeControl(), Interhaptics.Platforms.Mobile.GenericAndroidHapticAbstraction.HasVibrator(), Interhaptics.Platforms.Mobile.GenericAndroidHapticAbstraction.Initialize(), and Interhaptics.Platforms.Mobile.GenericAndroidHapticAbstraction.TimingsFromAmplitudes().
|
static |
Vibrate predefined effect (described in Vibration.PredefinedEffect). Available from Api Level >= 29. If 'cancel' is true, Cancel() will be called automatically.
Definition at line 191 of file GenericAndroidHapticAbstraction.cs.
References Interhaptics.Platforms.Mobile.GenericAndroidHapticAbstraction.Cancel(), Interhaptics.Platforms.Mobile.GenericAndroidHapticAbstraction.HasVibrator(), and Interhaptics.Platforms.Mobile.GenericAndroidHapticAbstraction.Initialize().
|
static |
Definition at line 16 of file GenericAndroidHapticAbstraction.cs.
Referenced by Interhaptics.Platforms.Mobile.GenericAndroidHapticAbstraction.TimingsFromAmplitudes().
|
static |
Definition at line 12 of file GenericAndroidHapticAbstraction.cs.