示例#1
0
 /// <summary>
 /// Sets the gamead vibration.
 /// </summary>
 /// <param name="state">The state.</param>
 public void SetVibration(GamepadVibrationState state)
 {
     if (_version != Input.gamepadsVersion)
     {
         throw new AccessViolationException();
     }
     Internal_SetVibration(_index, state.LeftLarge, state.LeftSmall, state.RightLarge, state.LeftSmall);
 }
 internal static extern void Internal_SetVibration(IntPtr obj, ref GamepadVibrationState state);
 /// <summary>
 /// Sets the state of the gamepad vibration. Ignored if controller does not support this.
 /// </summary>
 /// <param name="state">The state.</param>
 public void SetVibration(GamepadVibrationState state)
 {
     Internal_SetVibration(unmanagedPtr, ref state);
 }