mirror of
https://github.com/Facepunch/sbox-public.git
synced 2026-01-16 10:19:18 -05:00
This commit imports the C# engine code and game files, excluding C++ source code. [Source-Commit: ceb3d758046e50faa6258bc3b658a30c97743268]
35 lines
1.1 KiB
C#
35 lines
1.1 KiB
C#
namespace Sandbox;
|
|
|
|
partial record class HapticEffect
|
|
{
|
|
/// <summary>
|
|
/// A haptic pattern that represents a light, soft impact.
|
|
/// </summary>
|
|
public static HapticEffect SoftImpact => new( HapticPattern.SoftImpact, HapticPattern.SoftImpact, HapticPattern.SoftImpact );
|
|
|
|
/// <summary>
|
|
/// A haptic pattern that represents a hard, sudden impact.
|
|
/// </summary>
|
|
public static HapticEffect HardImpact => new( HapticPattern.HardImpact, HapticPattern.HardImpact, HapticPattern.HardImpact );
|
|
|
|
/// <summary>
|
|
/// Applies a simple rumble to the controller.
|
|
/// </summary>
|
|
public static HapticEffect Rumble => new( HapticPattern.Rumble );
|
|
|
|
/// <summary>
|
|
/// Applies a simple rumble to the left trigger.
|
|
/// </summary>
|
|
public static HapticEffect RumbleLeftTrigger => new( leftTriggerPattern: HapticPattern.Rumble );
|
|
|
|
/// <summary>
|
|
/// Applies a simple rumble to the right trigger.
|
|
/// </summary>
|
|
public static HapticEffect RumbleRightTrigger => new( rightTriggerPattern: HapticPattern.Rumble );
|
|
|
|
/// <summary>
|
|
/// A haptic effect that feels like a heartbeat.
|
|
/// </summary>
|
|
public static HapticEffect Heartbeat => new( HapticPattern.Heartbeat );
|
|
}
|