logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class SingleChildTestAchievementCondition

    A condition that wraps exactly one other, the way DurationCondition and NotCondition wrap theirs: it bubbles its child's validation, and — since it always asks to be ticked — accumulates how many seconds its child has held met, so a suite can prove a reset clears a tally that lives one level below the tree it directly holds.

    Inheritance
    object
    SingleChildTestAchievementCondition
    Namespace: Serenity.Achievements.Tests.Fakes
    Assembly: Tests.dll
    Syntax
    public class SingleChildTestAchievementCondition : AchievementCondition

    Constructors

    SingleChildTestAchievementCondition(AchievementCondition)

    Creates a node wrapping the given child.

    Declaration
    public SingleChildTestAchievementCondition(AchievementCondition child)
    Parameters
    Type Name Description
    AchievementCondition child

    The condition to wrap. May be null.

    Properties

    Children

    Declaration
    public override IReadOnlyList<AchievementCondition> Children { get; }
    Property Value
    Type Description
    IReadOnlyList<AchievementCondition>

    DisplayName

    Declaration
    public override string DisplayName { get; }
    Property Value
    Type Description
    string

    ElapsedSeconds

    How many seconds this node has accumulated while its child was met.

    Declaration
    public float ElapsedSeconds { get; }
    Property Value
    Type Description
    float

    NeedsTick

    Declaration
    public override bool NeedsTick { get; }
    Property Value
    Type Description
    bool

    Methods

    CollectSignalTypeNames(ICollection<string>)

    Declaration
    public override void CollectSignalTypeNames(ICollection<string> sink)
    Parameters
    Type Name Description
    ICollection<string> sink

    GetProgress(in AchievementEvaluationContext)

    Reports whether any time has accumulated, rather than calling IsMet(in AchievementEvaluationContext) again — that would accumulate twice per evaluation, the same trap the base class's own remarks warn a counting leaf away from.

    Declaration
    public override AchievementConditionProgress GetProgress(in AchievementEvaluationContext context)
    Parameters
    Type Name Description
    AchievementEvaluationContext context

    What the world looks like at this evaluation.

    Returns
    Type Description
    AchievementConditionProgress

    IsMet(in AchievementEvaluationContext)

    Declaration
    public override bool IsMet(in AchievementEvaluationContext context)
    Parameters
    Type Name Description
    AchievementEvaluationContext context
    Returns
    Type Description
    bool

    Reset()

    Declaration
    public override void Reset()

    Validate()

    Declaration
    public override string Validate()
    Returns
    Type Description
    string
    In this article
    © 2026 Serenity. All Rights Reserved