Class SingleChildAchievementCondition
Shared shape of every condition that wraps exactly one other: the serialized reference
itself, and the plumbing that has to reach through it — reset, validation, signal
collection, the tick and persistence questions, and the state round trip.
Inheritance
SingleChildAchievementCondition
Assembly: Serenity.UnityAchievements.Infrastructure.dll
Syntax
public abstract class SingleChildAchievementCondition : AchievementCondition
Constructors
SingleChildAchievementCondition()
Creates an unwrapped node, as Unity's polymorphic serializer does.
Declaration
protected SingleChildAchievementCondition()
SingleChildAchievementCondition(AchievementCondition)
Creates a node wrapping the given child.
Declaration
protected SingleChildAchievementCondition(AchievementCondition child)
Parameters
Fields
ChildFieldName
The name the wrapped child is serialized under, on every wrapper. See
ChildrenFieldName for why it is named rather than
spelled out at each binding site.
Declaration
public const string ChildFieldName = "inner"
Field Value
Properties
Child
The condition this node wraps.
Declaration
public AchievementCondition Child { get; }
Property Value
Children
Declaration
public override IReadOnlyList<AchievementCondition> Children { get; }
Property Value
MissingChildMessage
What this node reports when it wraps nothing at all.
Declaration
protected abstract string MissingChildMessage { get; }
Property Value
NeedsTick
Declaration
public override bool NeedsTick { get; }
Property Value
PersistsState
Declaration
public override bool PersistsState { get; }
Property Value
Methods
CaptureOwnState()
The node's own counter, for a wrapper that keeps one. Null by default.
Declaration
protected virtual string CaptureOwnState()
Returns
CaptureState()
Declaration
public override string CaptureState()
Returns
CollectSignalTypeNames(ICollection<string>)
Declaration
public override void CollectSignalTypeNames(ICollection<string> sink)
Parameters
Reset()
Declaration
public override void Reset()
RestoreOwnState(string)
Restores the node's own counter.
Declaration
protected virtual void RestoreOwnState(string ownState)
Parameters
RestoreState(string)
Declaration
public override void RestoreState(string state)
Parameters
| Type |
Name |
Description |
| string |
state |
|
Validate()
Declaration
public override string Validate()
Returns
ValidateOwnConfiguration()
Checks the node's own fields, once the child is known to be present.
Declaration
protected virtual string ValidateOwnConfiguration()
Returns
| Type |
Description |
| string |
What is wrong, or null when the node's own configuration is valid.
|