Esempio n. 1
0
 /// <summary>
 /// Constructs a new constant haptic effect.
 /// </summary>
 /// <param name="direction">The direction of the effect.</param>
 /// <param name="length">The length of the effect.</param>
 /// <param name="delay">The delay before the effect.</param>
 /// <param name="button">The button that triggers the effect.</param>
 /// <param name="interval">Minimum interval between effects.</param>
 /// <param name="level">The level of the effect.</param>
 /// <param name="attackLength">The attach length of the effect.</param>
 /// <param name="attackLevel">The attack level of the effect.</param>
 /// <param name="fadeLength">The fade length of the effect.</param>
 /// <param name="fadeLevel">The fade level of the effect.</param>
 public ConstantHapticEffect(HapticDirection direction, uint length, ushort delay, ushort button, ushort interval, short level, ushort attackLength, ushort attackLevel, ushort fadeLength, ushort fadeLevel)
 {
     Direction    = direction;
     Length       = length;
     Delay        = delay;
     Button       = button;
     Interval     = interval;
     Level        = level;
     AttackLength = attackLength;
     AttackLevel  = attackLevel;
     FadeLength   = fadeLength;
     FadeLevel    = fadeLevel;
 }
 /// <summary>
 /// Creates a new ramp haptic effect.
 /// </summary>
 /// <param name="direction">The direction of the effect.</param>
 /// <param name="length">The length of the effect.</param>
 /// <param name="delay">The delay before the effect.</param>
 /// <param name="button">The button that triggers the effect.</param>
 /// <param name="interval">Minimum interval between effects.</param>
 /// <param name="start">The start value.</param>
 /// <param name="end">The end value.</param>
 /// <param name="attackLength">The attach length of the effect.</param>
 /// <param name="attackLevel">The attack level of the effect.</param>
 /// <param name="fadeLength">The fade length of the effect.</param>
 /// <param name="fadeLevel">The fade level of the effect.</param>
 public RampHapticEffect(HapticDirection direction, uint length, ushort delay, ushort button, ushort interval, short start, short end, ushort attackLength, ushort attackLevel, ushort fadeLength, ushort fadeLevel)
 {
     Direction    = direction;
     Length       = length;
     Delay        = delay;
     Button       = button;
     Interval     = interval;
     Start        = start;
     End          = end;
     AttackLength = attackLength;
     AttackLevel  = attackLevel;
     FadeLength   = fadeLength;
     FadeLevel    = fadeLevel;
 }
 /// <summary>
 /// Creates a new custom haptic effect.
 /// </summary>
 /// <param name="direction">The direction of the effect.</param>
 /// <param name="length">The length of the effect.</param>
 /// <param name="delay">The delay before the effect.</param>
 /// <param name="button">The button that triggers the effect.</param>
 /// <param name="interval">Minimum interval between effects.</param>
 /// <param name="channels">Axes to use.</param>
 /// <param name="period">Sample periods.</param>
 /// <param name="samples">Amount of samples.</param>
 /// <param name="data">The samples.</param>
 /// <param name="attackLength">The attach length of the effect.</param>
 /// <param name="attackLevel">The attack level of the effect.</param>
 /// <param name="fadeLength">The fade length of the effect.</param>
 /// <param name="fadeLevel">The fade level of the effect.</param>
 public CustomHapticEffect(HapticDirection direction, uint length, ushort delay, ushort button, ushort interval, byte channels, ushort period, ushort samples, ushort[] data, ushort attackLength, ushort attackLevel, ushort fadeLength, ushort fadeLevel)
 {
     Direction    = direction;
     Length       = length;
     Delay        = delay;
     Button       = button;
     Interval     = interval;
     Channels     = channels;
     Period       = period;
     Samples      = samples;
     Data         = data;
     AttackLength = attackLength;
     AttackLevel  = attackLevel;
     FadeLength   = fadeLength;
     FadeLevel    = fadeLevel;
 }