Class AchievementDefinition
The definition for an achievement, which can be in the base list or externally created via mods. See ModAchievements.cs
Inheritance
System.Object
AchievementDefinition
Implements
System.ComponentModel.INotifyPropertyChanged
Assembly: Eco.Gameplay.dll
Syntax
public class AchievementDefinition : UnserializedEntry, INotifyPropertyChanged, ILinkable, IHasIcon, IController, IViewController, IHasUniversalID
Fields
AchievementProgressEvent
Declaration
public static ThreadSafeAction<AchievementProgressChange> AchievementProgressEvent
Field Value
Properties
Description
Declaration
public LocString Description { get; set; }
Property Value
DisplayName
Declaration
public LocString DisplayName { get; set; }
Property Value
Declaration
public string IconComment { get; }
Property Value
Type |
Description |
System.String |
|
IconName
Declaration
public string IconName { get; }
Property Value
Type |
Description |
System.String |
|
IsServerAchievement
Declaration
public bool IsServerAchievement { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
Name
Declaration
public string Name { get; }
Property Value
Type |
Description |
System.String |
|
NotifyEvery
Declaration
public float NotifyEvery { get; set; }
Property Value
Type |
Description |
System.Single |
|
RequiredProgress
Declaration
public float RequiredProgress { get; set; }
Property Value
Type |
Description |
System.Single |
|
Methods
CreateAchievementDefinition(LocString, LocString, Action<AchievementDefinition>, Boolean, Single, Nullable<Int32>)
Declaration
public static AchievementDefinition CreateAchievementDefinition(LocString displayName, LocString desc, Action<AchievementDefinition> setup, bool isServerAchievement, float requiredAmountOfProgress = 0F, Nullable<int> notifyEvery = null)
Parameters
Type |
Name |
Description |
LocString |
displayName |
The name of the achievement that will be shown to the player.
|
LocString |
desc |
|
System.Action<AchievementDefinition> |
setup |
|
System.Boolean |
isServerAchievement |
|
System.Single |
requiredAmountOfProgress |
|
System.Nullable<System.Int32> |
notifyEvery |
|
Returns
TriggerAchievementProgress(User, Func<LocString>, Nullable<Single>, Nullable<Single>)
Trigger the achievement or add progress to cumulative one
Declaration
public void TriggerAchievementProgress(User user, Func<LocString> description, Nullable<float> progressDelta = null, Nullable<float> progressAbsolute = null)
Parameters
Type |
Name |
Description |
User |
user |
|
System.Func<LocString> |
description |
|
System.Nullable<System.Single> |
progressDelta |
|
System.Nullable<System.Single> |
progressAbsolute |
|
UILinkContent()
Declaration
public override LocString UILinkContent()
Returns
Overrides
Implements
System.ComponentModel.INotifyPropertyChanged
Extension Methods