Class AchievementWizardPlatformSelection
Which storefronts CreateAchievementSettingsWindow's platforms step has switched on, as one flag per AchievementPlatformKind plus the ordered list the creator wants.
Inherited Members
Namespace: Serenity.Achievements.Infrastructure.Editor.Builder
Assembly: Serenity.UnityAchievements.Infrastructure.Editor.dll
Syntax
public sealed class AchievementWizardPlatformSelection
Remarks
The flags live in a parallel bool array indexed by AllKinds rather than in four named fields, because four named fields meant four switch statements that a fifth storefront would have to be added to four times — and a missed one fails silently. Unity has no dictionary serializer, so the array is the serializable surrogate: it survives a domain reload, and Serenity.Achievements.Infrastructure.Editor.Builder.AchievementWizardPlatformSelection.EnsureOneSlotPerKind grows it in place when a kind is added, so an older serialized window keeps its answers instead of throwing.
An unknown kind is refused rather than folded into a default, and
AllKinds_CoversEveryDeclaredPlatformKind is what proves the list is complete.
Constructors
AchievementWizardPlatformSelection()
Declaration
public AchievementWizardPlatformSelection()
Fields
AllKinds
Every storefront a wizard step can offer, in the order they are drawn and authored.
Declaration
public static readonly IReadOnlyList<AchievementPlatformKind> AllKinds
Field Value
| Type | Description |
|---|---|
| IReadOnlyList<AchievementPlatformKind> |
Methods
EnabledKinds()
The enabled storefronts, in AllKinds order.
Declaration
public IReadOnlyCollection<AchievementPlatformKind> EnabledKinds()
Returns
| Type | Description |
|---|---|
| IReadOnlyCollection<AchievementPlatformKind> |
IsEnabled(AchievementPlatformKind)
Whether kind is currently switched on.
Declaration
public bool IsEnabled(AchievementPlatformKind kind)
Parameters
| Type | Name | Description |
|---|---|---|
| AchievementPlatformKind | kind |
Returns
| Type | Description |
|---|---|
| bool |
Exceptions
| Type | Condition |
|---|---|
| ArgumentOutOfRangeException | When |
SetEnabled(AchievementPlatformKind, bool)
Switches kind to enabled.
Declaration
public void SetEnabled(AchievementPlatformKind kind, bool enabled)
Parameters
| Type | Name | Description |
|---|---|---|
| AchievementPlatformKind | kind | |
| bool | enabled |
Exceptions
| Type | Condition |
|---|---|
| ArgumentOutOfRangeException | When |