logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class FeedbackScaler

    Pure scaling policy applied to every impulse before it reaches a channel: it honours the global "enabled" switch and the global intensity multiplier. Keeping this logic here (engine-free) makes it directly unit-testable and the single place where the "vibration off" / accessibility scaling rules live.

    Inheritance
    object
    FeedbackScaler
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Serenity.Feedback.Domain.Services
    Assembly: Serenity.Feedback.Domain.dll
    Syntax
    public static class FeedbackScaler

    Methods

    Scale(FeedbackIntensity, float, bool)

    Scales an impulse by the global intensity, or zeroes it when feedback is disabled.

    Declaration
    public static FeedbackIntensity Scale(FeedbackIntensity intensity, float globalIntensity, bool enabled)
    Parameters
    Type Name Description
    FeedbackIntensity intensity

    The authored impulse.

    float globalIntensity

    Global multiplier (0..1); values outside the range are clamped.

    bool enabled

    When false, the result is silent regardless of intensity.

    Returns
    Type Description
    FeedbackIntensity

    The scaled impulse, preserving the original duration.

    In this article
    © 2026 Serenity. All Rights Reserved