using UnityEngine; using System.Collections; using MoreMountains.Tools; using System.Collections.Generic; namespace MoreMountains.Tools { [CreateAssetMenu(fileName="AchievementList",menuName="MoreMountains/Achievement List")] /// /// A scriptable object containing a list of achievements. You need to create one and store it in a Resources folder for this to work. /// public class MMAchievementList : ScriptableObject { /// the unique ID of this achievement list. This is used to save/load data. public string AchievementsListID = "AchievementsList"; /// the list of achievements public List Achievements; /// /// Asks for a reset of all the achievements in this list (they'll all be locked again, their progress lost). /// public virtual void ResetAchievements() { Debug.LogFormat ("Reset Achievements"); MMAchievementManager.ResetAchievements (AchievementsListID); } private MMReferenceHolder _instances; protected virtual void OnEnable() { _instances.Reference(this); } protected virtual void OnDisable() { _instances.Dispose(); } public static MMAchievementList Any => MMReferenceHolder.Any; } }