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.
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
StartTime
Declaration
public float StartTime { get; }
Property Value
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
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