/// <summary>
        /// When we catch an MMGameEvent, we do stuff based on its name
        /// </summary>
        /// <param name="gameEvent">Game event.</param>
        public virtual void OnMMEvent(MMGameEvent gameEvent)
        {
            switch (gameEvent.EventName)
            {
            case "Save":
                MMAchievementManager.SaveAchievements();
                break;

                /*
                 * // These are just examples of how you could catch a GameStart MMGameEvent and trigger the potential unlock of a corresponding achievement
                 * case "GameStart":
                 *      MMAchievementManager.UnlockAchievement("theFirestarter");
                 *      break;
                 * case "LifeLost":
                 *      MMAchievementManager.UnlockAchievement("theEndOfEverything");
                 *      break;
                 * case "Pause":
                 *      MMAchievementManager.UnlockAchievement("timeStop");
                 *      break;
                 * case "Jump":
                 *      MMAchievementManager.UnlockAchievement ("aSmallStepForMan");
                 *      MMAchievementManager.AddProgress ("toInfinityAndBeyond", 1);
                 *      break;*/
            }
        }
 /// <summary>
 /// On Awake, loads the achievement list and the saved file
 /// </summary>
 protected virtual void Awake()
 {
     // we load the list of achievements, stored in a ScriptableObject in our Resources folder.
     MMAchievementManager.LoadAchievementList();
     // we load our saved file, to update that list with the saved values.
     MMAchievementManager.LoadSavedAchievements();
 }
예제 #3
0
 /// <summary>
 /// When we catch an MMGameEvent, we do stuff based on its name
 /// </summary>
 /// <param name="gameEvent">Game event.</param>
 public virtual void OnMMEvent(MMGameEvent gameEvent)
 {
     switch (gameEvent.EventName)
     {
     case "Save":
         MMAchievementManager.SaveAchievements();
         break;
     }
 }
예제 #4
0
 /// <summary>
 /// Adds a menu item to enable help
 /// </summary>
 private static void EnableHelpInInspectors()
 {
     MMAchievementManager.ResetAllAchievements();
 }
 /// <summary>
 /// Asks for a reset of all the achievements in this list (they'll all be locked again, their progress lost).
 /// </summary>
 public virtual void ResetAchievements()
 {
     MMDebug.DebugLogTime("Reset Achievements");
     MMAchievementManager.ResetAchievements(AchievementsListID);
 }
예제 #6
0
 /// <summary>
 /// Asks for a reset of all the achievements in this list (they'll all be locked again, their progress lost).
 /// </summary>
 public virtual void ResetAchievements()
 {
     Debug.LogFormat("Reset Achievements");
     MMAchievementManager.ResetAchievements(AchievementsListID);
 }