Class ScoreThresholdCondition
Met while a score metric compares as authored against a value.
Inheritance
ScoreThresholdCondition
Assembly: Serenity.UnityAchievements.Infrastructure.dll
Syntax
[AchievementConditionCategory(AchievementConditionCategory.Metrics)]
public class ScoreThresholdCondition : AchievementCondition
Constructors
ScoreThresholdCondition()
Creates an unauthored condition, as Unity's polymorphic serializer does.
Declaration
public ScoreThresholdCondition()
ScoreThresholdCondition(string, ScoreComparator, float)
Creates a condition comparing a score metric against a value.
Declaration
public ScoreThresholdCondition(string scoreKey, ScoreComparator comparator, float value)
Parameters
| Type |
Name |
Description |
| string |
scoreKey |
The score metric to read.
|
| ScoreComparator |
comparator |
How the metric is compared.
|
| float |
value |
The value the metric is compared against.
|
Properties
Comparator
How the metric is compared against Value.
Declaration
public ScoreComparator Comparator { get; }
Property Value
DisplayName
Declaration
public override string DisplayName { get; }
Property Value
NeedsTick
Polled, because a score metric changes without telling anyone. A leaf that reads state
it cannot be notified about has to be asked, or a tree made only of these would never be
evaluated at all.
Declaration
public override bool NeedsTick { get; }
Property Value
ScoreKeyName
The score metric this condition reads.
Declaration
public string ScoreKeyName { get; }
Property Value
Value
The value the metric is compared against.
Declaration
public float Value { get; }
Property Value
Methods
Describe(bool)
Declaration
public override string Describe(bool isNested)
Parameters
| Type |
Name |
Description |
| bool |
isNested |
|
Returns
GetProgress(in AchievementEvaluationContext)
Declaration
public override AchievementConditionProgress GetProgress(in AchievementEvaluationContext context)
Parameters
Returns
IsMet(in AchievementEvaluationContext)
Declaration
public override bool IsMet(in AchievementEvaluationContext context)
Parameters
Returns
Validate()
Declaration
public override string Validate()
Returns