Skip to content

Instantly share code, notes, and snippets.

@cmcintosh
Created April 28, 2017 16:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cmcintosh/33c3fa684cdb49e7d91d8b0795d754c1 to your computer and use it in GitHub Desktop.
Save cmcintosh/33c3fa684cdb49e7d91d8b0795d754c1 to your computer and use it in GitHub Desktop.
Achievement System for Unity
interface Achievement {
int id; // Public id of this perticular achievement. used to load text.
string label; // This will be loaded and populated from the json file.
bool displayed; // Has been displayed to the user.
bool unlocked; // Has been unlocked by the user.
List<AchievementCondition> conditions[]; // A list of conditions that are required to unlock the Achievement.
void checkAcievementState();
}
interface AchievementCondition {
bool conditionMet(); // Checks if this specific condition has been met yet.
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment