logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class HudAnimationTriggerRules

    Canonical, engine-agnostic rule for classifying a HUD animation's trigger: which trigger kinds read a watched element's bound value, and therefore need a watched-element id to mean anything.

    Inheritance
    object
    HudAnimationTriggerRules
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Serenity.GameUi.Application.Validation
    Assembly: Serenity.GameUi.Application.dll
    Syntax
    public static class HudAnimationTriggerRules
    Remarks

    Defined once here because the same question — "does this trigger read a value?" — was being asked identically in three places that could not agree: the scanner's own validation rules (HudDefinitionScanner), the runtime host that wires up value watchers (UnityHudHostComponent), and the builder's watched-element picker gate (HudElementAnimationListGui). Mirrors HudRepresentationRules, which plays the same role for value-kind/representation pairing after that rule had been independently re-implemented in three places of its own.

    Methods

    IsValueTrigger(HudAnimationTrigger)

    Whether trigger reads a watched element's bound value — ON_VALUE_INCREASE, ON_VALUE_DECREASE and ON_VALUE_CHANGE do; ON_SIGNAL reacts to the signal alone and ON_SHOW reacts to the element's own visibility, so neither of those ever consults a watched value.

    Declaration
    public static bool IsValueTrigger(HudAnimationTrigger trigger)
    Parameters
    Type Name Description
    HudAnimationTrigger trigger

    The trigger kind to check.

    Returns
    Type Description
    bool

    True when the trigger needs a watched value to fire.

    In this article
    © 2026 Serenity. All Rights Reserved