Inventory Engine  v4.0
Static Public Member Functions | Static Public Attributes | Properties | List of all members
MoreMountains.Tools.MMAchievementManager Class Reference

This static class is in charge of storing the current state of the achievements, unlocking/locking them, and saving them to data files More...

Static Public Member Functions

static void LoadAchievementList (MMAchievementList achievementList)
 You'll need to call this method to initialize the manager More...
 
static void UnlockAchievement (string achievementID)
 Unlocks the specified achievement (if found). More...
 
static void LockAchievement (string achievementID)
 Locks the specified achievement (if found). More...
 
static void AddProgress (string achievementID, int newProgress)
 Adds progress to the specified achievement (if found). More...
 
static void SetProgress (string achievementID, int newProgress)
 Sets the progress of the specified achievement (if found) to the specified progress. More...
 
static void ResetAchievements (string listID)
 Removes saved data and resets all achievements from a list More...
 
static void ResetAllAchievements ()
 
static void LoadSavedAchievements ()
 Loads the saved achievements file and updates the array with its content. More...
 
static void SaveAchievements ()
 Saves the achievements current status to a file on disk More...
 
static void FillSerializedMMAchievementManager (SerializedMMAchievementManager serializedAchievements)
 Serializes the contents of the achievements array to a serialized, ready to save object More...
 
static void ExtractSerializedMMAchievementManager (SerializedMMAchievementManager serializedAchievements)
 Extracts the serialized achievements into our achievements array if the achievements ID match. More...
 

Static Public Attributes

static string _defaultFileName = "Achievements"
 
static string _saveFolderName = "MMAchievements/"
 
static string _saveFileExtension = ".achievements"
 
static string SaveFileName
 
static string ListID
 

Properties

static List< MMAchievementAchievementsList [get]
 

Detailed Description

This static class is in charge of storing the current state of the achievements, unlocking/locking them, and saving them to data files

Member Function Documentation

◆ AddProgress()

static void MoreMountains.Tools.MMAchievementManager.AddProgress ( string  achievementID,
int  newProgress 
)
static

Adds progress to the specified achievement (if found).

Parameters
achievementIDAchievement ID.
newProgressNew progress.

◆ ExtractSerializedMMAchievementManager()

static void MoreMountains.Tools.MMAchievementManager.ExtractSerializedMMAchievementManager ( SerializedMMAchievementManager  serializedAchievements)
static

Extracts the serialized achievements into our achievements array if the achievements ID match.

Parameters
serializedAchievementsSerialized achievements.

◆ FillSerializedMMAchievementManager()

static void MoreMountains.Tools.MMAchievementManager.FillSerializedMMAchievementManager ( SerializedMMAchievementManager  serializedAchievements)
static

Serializes the contents of the achievements array to a serialized, ready to save object

Parameters
serializedInventorySerialized inventory.

◆ LoadAchievementList()

static void MoreMountains.Tools.MMAchievementManager.LoadAchievementList ( MMAchievementList  achievementList)
static

You'll need to call this method to initialize the manager

◆ LoadSavedAchievements()

static void MoreMountains.Tools.MMAchievementManager.LoadSavedAchievements ( )
static

Loads the saved achievements file and updates the array with its content.

◆ LockAchievement()

static void MoreMountains.Tools.MMAchievementManager.LockAchievement ( string  achievementID)
static

Locks the specified achievement (if found).

Parameters
achievementIDAchievement ID.

◆ ResetAchievements()

static void MoreMountains.Tools.MMAchievementManager.ResetAchievements ( string  listID)
static

Removes saved data and resets all achievements from a list

Parameters
listIDThe ID of the achievement list to reset.

◆ ResetAllAchievements()

static void MoreMountains.Tools.MMAchievementManager.ResetAllAchievements ( )
static

◆ SaveAchievements()

static void MoreMountains.Tools.MMAchievementManager.SaveAchievements ( )
static

Saves the achievements current status to a file on disk

◆ SetProgress()

static void MoreMountains.Tools.MMAchievementManager.SetProgress ( string  achievementID,
int  newProgress 
)
static

Sets the progress of the specified achievement (if found) to the specified progress.

Parameters
achievementIDAchievement ID.
newProgressNew progress.

◆ UnlockAchievement()

static void MoreMountains.Tools.MMAchievementManager.UnlockAchievement ( string  achievementID)
static

Unlocks the specified achievement (if found).

Parameters
achievementIDAchievement I.

Member Data Documentation

◆ _defaultFileName

string MoreMountains.Tools.MMAchievementManager._defaultFileName = "Achievements"
static

◆ _saveFileExtension

string MoreMountains.Tools.MMAchievementManager._saveFileExtension = ".achievements"
static

◆ _saveFolderName

string MoreMountains.Tools.MMAchievementManager._saveFolderName = "MMAchievements/"
static

◆ ListID

string MoreMountains.Tools.MMAchievementManager.ListID
static

◆ SaveFileName

string MoreMountains.Tools.MMAchievementManager.SaveFileName
static

Property Documentation

◆ AchievementsList

List<MMAchievement> MoreMountains.Tools.MMAchievementManager.AchievementsList
staticget

The documentation for this class was generated from the following file: