logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Interface IStateReader

    Interface for reading state values from the procedural animation state bus. All state is key-based: StateKeyId → float mappings.

    Namespace: Serenity.ProceduralExpression.Domain.Interfaces
    Assembly: Serenity.ProceduralExpression.Domain.dll
    Syntax
    public interface IStateReader

    Methods

    Get(StateKeyId, float)

    Gets the current value for the specified state key.

    Declaration
    float Get(StateKeyId key, float defaultValue = 0)
    Parameters
    Type Name Description
    StateKeyId key

    The state key to retrieve.

    float defaultValue

    The default value if the key is not found.

    Returns
    Type Description
    float

    The current state value, or defaultValue if not found.

    TryGet(StateKeyId, out float)

    Tries to get the current value for the specified state key.

    Declaration
    bool TryGet(StateKeyId key, out float value)
    Parameters
    Type Name Description
    StateKeyId key

    The state key to retrieve.

    float value

    The output value if found.

    Returns
    Type Description
    bool

    True if the key was found, false otherwise.

    In this article
    © 2026 Serenity. All Rights Reserved