Interface IHudElementAnimationDefinition
One authored HUD element animation: what triggers it, what it targets, and how it plays.
Namespace: Serenity.GameUi.Domain.Interfaces
Assembly: Serenity.GameUi.Domain.dll
Syntax
public interface IHudElementAnimationDefinition
Remarks
Engine-agnostic on purpose, mirroring IHudElementDefinition itself: the actual animation
asset (a ProceduralAnimator layer) is a Unity-side concern the scanner and any other engine-agnostic
consumer never needs to open. HasAnimationAsset is the one bit of information they need
instead — whether Unity resolved an asset for this entry — so a validation rule can flag an animation
authored with no asset without knowing what a ProceduralLayerSO is.
Properties
CooldownSeconds
Minimum time between two plays of this animation, in seconds.
Declaration
float CooldownSeconds { get; }
Property Value
| Type | Description |
|---|---|
| float |
HasAnimationAsset
Whether an animation asset is actually authored for this entry. Answered on the Unity side, so an
engine-agnostic caller (the scanner, a validator) can flag a mistargeted entry without ever opening
a ProceduralLayerSO.
Declaration
bool HasAnimationAsset { get; }
Property Value
| Type | Description |
|---|---|
| bool |
PlaysWhileHidden
Whether this animation keeps playing while the owning element itself is hidden.
Declaration
bool PlaysWhileHidden { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Remarks
Required for an activation/blink layer that owns the element's visibility for the duration of its
own animation — without this, an element authored to start hidden (StartsHidden) would never
let its own activation sequence run, since the element is hidden before the sequence gets a chance
to play.
This change introduces the flag and its authoring-time validation only — the runtime animation host does not yet check it, so enabling this on an entry silences the hidden-element validator warning without changing playback behavior. Wiring the animation host to honor this flag is a follow-up change.
SignalTypeName
The assembly-qualified signal type that plays this animation when Trigger is ON_SIGNAL. Meaningless, and ignored, for every other trigger.
Declaration
string SignalTypeName { get; }
Property Value
| Type | Description |
|---|---|
| string |
Trigger
What makes this animation play.
Declaration
HudAnimationTrigger Trigger { get; }
Property Value
| Type | Description |
|---|---|
| HudAnimationTrigger |
WatchedElementId
The id of the HUD element whose bound value this animation watches, or empty to watch the owning element's own value.
Declaration
string WatchedElementId { get; }
Property Value
| Type | Description |
|---|---|
| string |
Remarks
Value triggers only. Meaningless, and ignored, when Trigger is
ON_SHOW or ON_SIGNAL — neither
fires off a value change, so there is nothing here to watch. The animation entry itself now lives on
the element it visually animates; the ProceduralLayerSO in Layer bakes that same
element's id as its own transform id, so this field plays no part in where the animation lands —
only in which element's value change is allowed to trigger it.