Struct AchievementPointsSummary
How far the player is through everything the project has to award, as the one line the achievements
screen prints above the list: "120 / 500".
Assembly: Serenity.Achievements.Infrastructure.dll
Syntax
public readonly struct AchievementPointsSummary : IEquatable<AchievementPointsSummary>
Fields
How the two point totals are rendered, earned as {0} and maximum as {1}.
Declaration
public const string DefaultFormat = "{0} / {1}"
Field Value
Earned
The points the player has actually earned.
Declaration
public readonly int Earned
Field Value
Maximum
The points every registered achievement adds up to.
Declaration
public readonly int Maximum
Field Value
Text
The summary rendered for display.
Declaration
public readonly string Text
Field Value
Properties
Completion
The share of the available points the player has earned, as a 0..1 fraction. A project that awards
no points at all reads as complete rather than as an unreachable zero.
Declaration
public double Completion { get; }
Property Value
Methods
Builds the summary of a player's progress through the project's points.
Declaration
public static AchievementPointsSummary Create(int earnedPoints, int maximumPoints, string format = "{0} / {1}", IFormatProvider formatProvider = null)
Parameters
| Type |
Name |
Description |
| int |
earnedPoints |
The points the player has earned. Negative values are clamped to zero.
|
| int |
maximumPoints |
The points on offer. Negative values are clamped to zero.
|
| string |
format |
The format string. null or empty uses DefaultFormat.
|
| IFormatProvider |
formatProvider |
The culture the numbers are rendered in. null uses the invariant culture.
|
Returns
Equals(AchievementPointsSummary)
Declaration
public bool Equals(AchievementPointsSummary other)
Parameters
Returns
Equals(object)
Declaration
public override bool Equals(object obj)
Parameters
| Type |
Name |
Description |
| object |
obj |
|
Returns
Overrides
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Overrides
ToString()
Declaration
public override string ToString()
Returns
Overrides
Operators
operator ==(AchievementPointsSummary, AchievementPointsSummary)
Declaration
public static bool operator ==(AchievementPointsSummary left, AchievementPointsSummary right)
Parameters
Returns
operator !=(AchievementPointsSummary, AchievementPointsSummary)
Declaration
public static bool operator !=(AchievementPointsSummary left, AchievementPointsSummary right)
Parameters
Returns
Implements