logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Struct StateKeyPulse

    Pure math behind the state-key simulator's "Pulse" button: replays the same 0-1-0 parabolic arc gameplay controllers write onto a pulse-style state key over a traversal (e.g. RailShooter's EnemyBehaviorController driving an airborne/roll/hit key), so the simulator reproduces real gameplay timing — a slow manual slider drag cannot cross a TriggerAction rule's threshold condition the way an actual pulse does.

    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    ValueType.ToString()
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetType()
    Namespace: Serenity.Editor.AnimationHub.Engine
    Assembly: Serenity.AnimationHub.Editor.dll
    Syntax
    public readonly struct StateKeyPulse

    Constructors

    StateKeyPulse(float, float)

    Declaration
    public StateKeyPulse(float startTime, float durationSeconds)
    Parameters
    Type Name Description
    float startTime
    float durationSeconds

    Properties

    DurationSeconds

    Declaration
    public float DurationSeconds { get; }
    Property Value
    Type Description
    float

    StartTime

    Declaration
    public float StartTime { get; }
    Property Value
    Type Description
    float

    Methods

    IsFinishedAt(float)

    True once time has reached or passed the end of the pulse.

    Declaration
    public bool IsFinishedAt(float time)
    Parameters
    Type Name Description
    float time
    Returns
    Type Description
    bool

    NormalizedValueAt(float)

    0 before StartTime and once the pulse is finished; otherwise the parabolic arc 4t(1-t) for t normalized into [0, 1] across DurationSeconds — zero at both ends, peaking at 1.0 exactly halfway through.

    Declaration
    public float NormalizedValueAt(float time)
    Parameters
    Type Name Description
    float time
    Returns
    Type Description
    float
    In this article
    © 2026 Serenity. All Rights Reserved