Description
The ProgressionFraction
property of the Achievement
class represents the current progression of an achievement as a floating-point value. This value ranges from 0 to 1, where 0 indicates 0% completion and 1 indicates 100% completion. The value is not clamped, meaning it can exceed these bounds if necessary.
Usage
Use the ProgressionFraction
property to track and update the progress of an achievement. This can be useful for displaying progress bars or determining when an achievement is complete.
Example
// Example of using the ProgressionFraction property
Achievement achievement = new Achievement();
// Set the progression to 50%
achievement.ProgressionFraction = 0.5f;
// Check if the achievement is complete
if (achievement.ProgressionFraction >= 1.0f)
{
Console.WriteLine("Achievement completed!");
}