logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class HitStopEffect

    Brief time-freeze ("hit-stop"): dips Time.timeScale to TargetTimeScale for DurationSeconds of REAL (unscaled) time, then restores the prior scale. Gameplay timing must be deterministic, so this effect is intentionally NOT affected by global intensity.

    Inheritance
    object
    HitStopEffect
    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 HitStopEffect : IFeedbackEffect

    Constructors

    HitStopEffect(float, float, bool)

    Initializes a new instance.

    Declaration
    public HitStopEffect(float targetTimeScale, float durationSeconds, bool haveExitTime = true)
    Parameters
    Type Name Description
    float targetTimeScale
    float durationSeconds
    bool haveExitTime

    Fields

    DurationSeconds

    Declaration
    public readonly float DurationSeconds
    Field Value
    Type Description
    float

    How long to hold the dip, in unscaled real-time seconds.

    HaveExitTime

    Declaration
    public readonly bool HaveExitTime
    Field Value
    Type Description
    bool

    When true the time scale is restored after the duration; when false the dip is held indefinitely until another effect clears it. A persistent full freeze halts the game until something restores it — use with care.

    Kind

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

    Stable kind id for this effect.

    TargetTimeScale

    Declaration
    public readonly float TargetTimeScale
    Field Value
    Type Description
    float

    Target time scale during the dip (0 = full freeze).

    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