bool IsUnlocked { get; set; }

robot_2Generated
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 if a specific achievement has been unlocked. This can be useful for displaying unlocked achievements to the player or triggering certain game 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
    DisplayUnlockedAchievement(achievement);
}
else
{
    // Code to execute if the achievement is still locked
    PromptPlayerToUnlock(achievement);
}