Resolve WES-181 "Missing code doc"
This commit is contained in:
committed by
Louis Adriaens
parent
7505ae7262
commit
3d99184717
@@ -48,9 +48,17 @@ public class PersistentDataController
|
||||
/// </summary>
|
||||
public List<byte> data = new List<byte>();
|
||||
|
||||
/// <summary>
|
||||
/// Create a new PersistentDataEntry
|
||||
/// </summary>
|
||||
/// <param name="key"></param>
|
||||
/// <param name="data"></param>
|
||||
public PersistentDataEntry(string key, byte[] data) : this(key, data.ToList())
|
||||
{ }
|
||||
|
||||
/// <summary>
|
||||
/// Create a new PersistentDataEntry
|
||||
/// </summary>
|
||||
public PersistentDataEntry(string key, List<byte> data)
|
||||
{
|
||||
this.key = key;
|
||||
@@ -171,10 +179,30 @@ public class PersistentDataController
|
||||
[Serializable]
|
||||
public class SavedUserData : PersistentDataContainer
|
||||
{
|
||||
/// <summary>
|
||||
/// The user's username
|
||||
/// </summary>
|
||||
public string username = null;
|
||||
|
||||
/// <summary>
|
||||
/// The index of the user's avatar in the UserList.AVATARS list
|
||||
/// </summary>
|
||||
public int avatarIndex = -1;
|
||||
|
||||
/// <summary>
|
||||
/// The total playtime of the user
|
||||
/// </summary>
|
||||
/// <remarks>Not implemented yet</remarks>
|
||||
public double playtime = 0.0;
|
||||
|
||||
/// <summary>
|
||||
/// A list of progress on minigames the user has
|
||||
/// </summary>
|
||||
public List<SavedMinigameProgress> minigames = new List<SavedMinigameProgress>();
|
||||
|
||||
/// <summary>
|
||||
/// A list of progress on courses the user has
|
||||
/// </summary>
|
||||
public List<SavedCourseProgress> courses = new List<SavedCourseProgress>();
|
||||
}
|
||||
|
||||
@@ -210,9 +238,9 @@ public class PersistentDataController
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// Check whether there are enough inUse Learnables
|
||||
/// </summary>
|
||||
/// <returns> bool which indicates if there are enough inUseLearnables </returns>
|
||||
/// <returns></returns>
|
||||
private bool EnoughLearnables()
|
||||
{
|
||||
// There need to be more then 5 non completed learnables
|
||||
@@ -297,9 +325,24 @@ public class PersistentDataController
|
||||
[Serializable]
|
||||
public class SavedLearnableProgress : PersistentDataContainer
|
||||
{
|
||||
/// <summary>
|
||||
/// Index of the Learnbable in its Theme
|
||||
/// </summary>
|
||||
public int index;
|
||||
|
||||
/// <summary>
|
||||
/// Bool that indicated whether the user already started learning this Learnable
|
||||
/// </summary>
|
||||
public bool inUse = false;
|
||||
|
||||
/// <summary>
|
||||
/// Display name of the Learnable
|
||||
/// </summary>
|
||||
public string name;
|
||||
|
||||
/// <summary>
|
||||
/// Progress of the learnabe, a number between -5.0 and +5.0
|
||||
/// </summary>
|
||||
public float progress = 0.0f;
|
||||
}
|
||||
|
||||
@@ -309,8 +352,19 @@ public class PersistentDataController
|
||||
[Serializable]
|
||||
public class SavedMinigameProgress : PersistentDataContainer
|
||||
{
|
||||
/// <summary>
|
||||
/// Index of the minigame
|
||||
/// </summary>
|
||||
public MinigameIndex minigameIndex;
|
||||
|
||||
/// <summary>
|
||||
/// The 10 last scores of a user
|
||||
/// </summary>
|
||||
public List<Score> latestScores = new List<Score>();
|
||||
|
||||
/// <summary>
|
||||
/// Top 10 scores of a user
|
||||
/// </summary>
|
||||
public List<Score> highestScores = new List<Score>();
|
||||
}
|
||||
|
||||
@@ -320,11 +374,34 @@ public class PersistentDataController
|
||||
[Serializable]
|
||||
private class SavedDataStructure
|
||||
{
|
||||
/// <summary>
|
||||
/// The version of the PersistentDataController with which this savefile is created
|
||||
/// </summary>
|
||||
public int version = VERSION;
|
||||
|
||||
/// <summary>
|
||||
/// A list of all users
|
||||
/// </summary>
|
||||
public List<SavedUserData> users = new List<SavedUserData>();
|
||||
|
||||
/// <summary>
|
||||
/// The index of the current user in the this.users list
|
||||
/// </summary>
|
||||
public int currentUser = -1;
|
||||
|
||||
/// <summary>
|
||||
/// The index of the current minigame
|
||||
/// </summary>
|
||||
public MinigameIndex currentMinigame;
|
||||
|
||||
/// <summary>
|
||||
/// The index of the current course
|
||||
/// </summary>
|
||||
public CourseIndex currentCourse;
|
||||
|
||||
/// <summary>
|
||||
/// The index of the current theme
|
||||
/// </summary>
|
||||
public ThemeIndex currentTheme;
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user