bool IsUnlocked { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The IsUnlocked property of the Achievement class indicates whether the achievement has been unlocked by the player. It returns a boolean value, where true signifies that the achievement is unlocked, and false means it is still locked.

Usage

Use the IsUnlocked property to check the status of an achievement. This can be useful for displaying unlocked achievements to the player or triggering events when an achievement is unlocked.

Example

// Example of checking if an achievement is unlocked
Achievement achievement = new Achievement();

if (achievement.IsUnlocked)
{
    // Code to execute if the achievement is unlocked
    DisplayAchievementUnlocked(achievement);
}
else
{
    // Code to execute if the achievement is still locked
    DisplayAchievementLocked(achievement);
}