logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class LedEffect

    Controller LED color for a duration. Hardware-agnostic: drives any controllable controller LED (PlayStation light bar on DualSense / DualShock 4, Switch Pro home-ring intensity, ...). RGBA are 0..1 floats (engine-agnostic); A doubles as a brightness multiplier so global intensity can dim the LED without changing its hue.

    Inheritance
    object
    LedEffect
    Implements
    IFeedbackEffect
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    Namespace: Serenity.Feedback.Application.Effects
    Assembly: Serenity.Feedback.Application.dll
    Syntax
    public sealed class LedEffect : IFeedbackEffect

    Constructors

    LedEffect(float, float, float, float, float, bool)

    Initializes a new instance.

    Declaration
    public LedEffect(float r, float g, float b, float a, float durationSeconds, bool haveExitTime = true)
    Parameters
    Type Name Description
    float r
    float g
    float b
    float a
    float durationSeconds
    bool haveExitTime

    Fields

    A

    Declaration
    public readonly float A
    Field Value
    Type Description
    float

    Brightness/alpha (0..1). Scaled by global intensity.

    B

    Declaration
    public readonly float B
    Field Value
    Type Description
    float

    DurationSeconds

    Declaration
    public readonly float DurationSeconds
    Field Value
    Type Description
    float

    G

    Declaration
    public readonly float G
    Field Value
    Type Description
    float

    HaveExitTime

    Declaration
    public readonly bool HaveExitTime
    Field Value
    Type Description
    bool

    When true the channel auto-resets the color after its duration; when false the color persists until another effect overwrites it (e.g. a black LED effect).

    Kind

    Declaration
    public const string Kind = "led"
    Field Value
    Type Description
    string

    Stable kind id for this effect.

    R

    Declaration
    public readonly float R
    Field Value
    Type Description
    float

    Properties

    BypassesGlobalGate

    Declaration
    public bool BypassesGlobalGate { get; }
    Property Value
    Type Description
    bool

    When true, this effect ignores the global vibration enable/intensity settings — it is dispatched even when feedback is disabled and is never passed through Scaled(float). Reserved for non-haptic effects (e.g. audio) that must not be silenced or attenuated by the controller-vibration toggle. Haptic effects return false.

    EffectKind

    Declaration
    public string EffectKind { get; }
    Property Value
    Type Description
    string

    Stable identifier of the effect type (e.g. "vibration"). Used for logging/diagnostics.

    Methods

    Scaled(float)

    Returns a copy of this effect scaled by the global intensity multiplier (0..1).

    Declaration
    public IFeedbackEffect Scaled(float globalIntensity)
    Parameters
    Type Name Description
    float globalIntensity

    Global multiplier; values outside 0..1 are clamped by the effect.

    Returns
    Type Description
    IFeedbackEffect

    A new, scaled effect of the same type.

    Implements

    IFeedbackEffect
    In this article
    © 2026 Serenity. All Rights Reserved