Created
April 28, 2017 16:00
-
-
Save cmcintosh/33c3fa684cdb49e7d91d8b0795d754c1 to your computer and use it in GitHub Desktop.
Achievement System for Unity
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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