logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class AndCondition

    Met only when every child is met.

    Inheritance
    object
    CompositeAchievementCondition
    AndCondition
    Inherited Members
    CompositeAchievementCondition.MinimumChildren
    CompositeAchievementCondition.ChildrenFieldName
    CompositeAchievementCondition.Reset()
    CompositeAchievementCondition.Validate()
    CompositeAchievementCondition.CaptureState()
    CompositeAchievementCondition.RestoreState(string)
    CompositeAchievementCondition.CollectSignalTypeNames(ICollection<string>)
    CompositeAchievementCondition.CaptureOwnState()
    CompositeAchievementCondition.RestoreOwnState(string)
    CompositeAchievementCondition.AnyChild(Func<AchievementCondition, bool>)
    CompositeAchievementCondition.Conditions
    CompositeAchievementCondition.Children
    CompositeAchievementCondition.NeedsTick
    CompositeAchievementCondition.PersistsState
    Namespace: Serenity.Achievements.Infrastructure.Conditions
    Assembly: Serenity.UnityAchievements.Infrastructure.dll
    Syntax
    [AchievementConditionCategory(AchievementConditionCategory.Logic)]
    public class AndCondition : CompositeAchievementCondition
    Remarks

    Every child is evaluated on every pass rather than short-circuiting on the first failure, because a child that counts — a signal tally, a duration — only counts when it is asked. Short-circuiting would silently make an achievement depend on the order its rules were authored in.

    Constructors

    AndCondition()

    Creates an empty composite, as Unity's polymorphic serializer does.

    Declaration
    public AndCondition()

    AndCondition(params AchievementCondition[])

    Creates a composite met when every child is met.

    Declaration
    public AndCondition(params AchievementCondition[] children)
    Parameters
    Type Name Description
    AchievementCondition[] children

    The children that all have to be met.

    Properties

    DisplayName

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

    Methods

    Describe(bool)

    Declaration
    public override string Describe(bool isNested)
    Parameters
    Type Name Description
    bool isNested
    Returns
    Type Description
    string

    GetProgress(in AchievementEvaluationContext)

    Declaration
    public override AchievementConditionProgress GetProgress(in AchievementEvaluationContext context)
    Parameters
    Type Name Description
    AchievementEvaluationContext context
    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
    In this article
    © 2026 Serenity. All Rights Reserved