public static void GetALvl(string lvlName) { //Get the enum from the string FreshLevels.Type lvlType = FreshLevels.Type.None; lvlType = FreshLevels.GetTypeNameForStr(lvlName); if (lvlType != FreshLevels.Type.None) { RemoteData.GetUsageStats(lvlName, (data) => { if (data != "error") { //Debug.Log("Writing unparsed for " + lvlName); for (int i = 0; i < unparsedBool.Length; i++) { if (!unparsedBool[i]) { unparsedBool[i] = true; unparsedStr[i] = data; unparsedInt[i] = (int)lvlType; break; } } } }); } }
public static void UnlockThisLevel(string level) { if (level == "StartMenu") { return; } if (level == "ESJ2Title") { return; } if (level == "MegaMetaWorld") { return; } FreshLevels.Type t = FreshLevels.GetTypeNameForStr(level); if (t == FreshLevels.Type.None) { Debug.Log("Error: string " + level + " returned type .None in GetTypeNameForStr. Level not unlocked!"); return; } UnlockThisLevel(t); }