logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Interface IWeightProvider<TContext>

    Interface for providing weight values to layers via rules. Separates the "when" (condition) from the "how much" (weight).

    Namespace: Serenity.ProceduralAnimator.Application.Interfaces
    Assembly: Serenity.ProceduralAnimator.Application.dll
    Syntax
    public interface IWeightProvider<TContext>
    Type Parameters
    Name Description
    TContext

    The type of procedural context used by the implementation.

    Methods

    GetWeight(in TContext)

    Gets the weight value for the given procedural context. Returns a value typically between 0-1, but can exceed these bounds.

    Declaration
    float GetWeight(in TContext ctx)
    Parameters
    Type Name Description
    TContext ctx

    The current procedural context with state values.

    Returns
    Type Description
    float

    The computed weight value.

    In this article
    © 2026 Serenity. All Rights Reserved