Files
sbox-public/engine/Sandbox.Engine/Systems/Input/Haptics/HapticEffect.Effects.cs
s&box team 71f266059a Open source release
This commit imports the C# engine code and game files, excluding C++ source code.

[Source-Commit: ceb3d758046e50faa6258bc3b658a30c97743268]
2025-11-24 09:05:18 +00:00

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 );
}