Class SignalReceivedCondition
Met once a signal of the authored type has been dispatched a given number of times.
Inheritance
SignalReceivedCondition
Assembly: Serenity.UnityAchievements.Infrastructure.dll
Syntax
[AchievementConditionCategory(AchievementConditionCategory.Triggers)]
public class SignalReceivedCondition : AchievementCondition
Constructors
SignalReceivedCondition()
Creates an unauthored condition, as Unity's polymorphic serializer does.
Declaration
public SignalReceivedCondition()
SignalReceivedCondition(string, int)
Creates a condition counting a given signal type.
Declaration
public SignalReceivedCondition(string signalTypeName, int requiredCount = 1)
Parameters
| Type |
Name |
Description |
| string |
signalTypeName |
The signal type name to count.
|
| int |
requiredCount |
How many of those signals unlock the achievement.
|
Properties
DisplayName
Declaration
public override string DisplayName { get; }
Property Value
ObservedCount
How many matching signals have been seen so far.
Declaration
public int ObservedCount { get; }
Property Value
PersistsState
Declaration
public override bool PersistsState { get; }
Property Value
RequiredCount
How many signals of that type unlock the achievement.
Declaration
public int RequiredCount { get; }
Property Value
SignalTypeName
The signal type name this condition counts.
Declaration
public string SignalTypeName { get; }
Property Value
Methods
CaptureState()
Declaration
public override string CaptureState()
Returns
CollectSignalTypeNames(ICollection<string>)
Declaration
public override void CollectSignalTypeNames(ICollection<string> sink)
Parameters
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
Reset()
Declaration
public override void Reset()
RestoreState(string)
Restores the tally, clamped to what the condition can still use. A stored count arrives
from a store and may have been written against a larger requirement, so anything past
the current one is treated as "already satisfied" rather than left to grow unbounded.
Declaration
public override void RestoreState(string state)
Parameters
| Type |
Name |
Description |
| string |
state |
The tally previously captured.
|
Validate()
Declaration
public override string Validate()
Returns