public static void SaveRecord(string RecordName, string key, Color value) { RecordTable table = GetData(RecordName); table.SetRecord(key, value); SaveData(RecordName, table); }
public static void SaveFavorites() { RecordTable data = new RecordTable(); for (int i = 0; i < s_favoritesList.Count; i++) { data.SetRecord(s_favoritesList[i], ""); } RecordManager.SaveData(c_recordName, data); }
public static void SaveOption() { RecordTable difficulty = new RecordTable(); for (int i = 0; i < s_difficultyLevels.Count; i++) { difficulty.SetRecord(s_difficultyLevels[i], ""); } RecordManager.SaveData(c_difficultyRecordKey, difficulty); RecordTable poemTypes = new RecordTable(); for (int i = 0; i < s_poemTypes.Count; i++) { poemTypes.SetRecord(s_poemTypes[i], ""); } RecordManager.SaveData(c_poemTypesKey, poemTypes); RecordTable langeConfig = new RecordTable(); langeConfig.SetEnumRecord(c_langeuageKey, LanguageManager.s_currentLanguage); RecordManager.SaveData(c_langeuageRecord, langeConfig); }
static int SetRecord(IntPtr L) { try { int count = LuaDLL.lua_gettop(L); if (count == 3 && TypeChecker.CheckTypes(L, 1, typeof(RecordTable), typeof(string), typeof(UnityEngine.Vector2))) { RecordTable obj = (RecordTable)ToLua.ToObject(L, 1); string arg0 = ToLua.ToString(L, 2); UnityEngine.Vector2 arg1 = (UnityEngine.Vector2)ToLua.ToObject(L, 3); obj.SetRecord(arg0, arg1); return(0); } else if (count == 3 && TypeChecker.CheckTypes(L, 1, typeof(RecordTable), typeof(string), typeof(UnityEngine.Vector3))) { RecordTable obj = (RecordTable)ToLua.ToObject(L, 1); string arg0 = ToLua.ToString(L, 2); UnityEngine.Vector3 arg1 = (UnityEngine.Vector3)ToLua.ToObject(L, 3); obj.SetRecord(arg0, arg1); return(0); } else if (count == 3 && TypeChecker.CheckTypes(L, 1, typeof(RecordTable), typeof(string), typeof(UnityEngine.Color))) { RecordTable obj = (RecordTable)ToLua.ToObject(L, 1); string arg0 = ToLua.ToString(L, 2); UnityEngine.Color arg1 = (UnityEngine.Color)ToLua.ToObject(L, 3); obj.SetRecord(arg0, arg1); return(0); } else if (count == 3 && TypeChecker.CheckTypes(L, 1, typeof(RecordTable), typeof(string), typeof(string))) { RecordTable obj = (RecordTable)ToLua.ToObject(L, 1); string arg0 = ToLua.ToString(L, 2); string arg1 = ToLua.ToString(L, 3); obj.SetRecord(arg0, arg1); return(0); } else if (count == 3 && TypeChecker.CheckTypes(L, 1, typeof(RecordTable), typeof(string), typeof(bool))) { RecordTable obj = (RecordTable)ToLua.ToObject(L, 1); string arg0 = ToLua.ToString(L, 2); bool arg1 = LuaDLL.lua_toboolean(L, 3); obj.SetRecord(arg0, arg1); return(0); } else if (count == 3 && TypeChecker.CheckTypes(L, 1, typeof(RecordTable), typeof(string), typeof(float))) { RecordTable obj = (RecordTable)ToLua.ToObject(L, 1); string arg0 = ToLua.ToString(L, 2); float arg1 = (float)LuaDLL.lua_tonumber(L, 3); obj.SetRecord(arg0, arg1); return(0); } else { return(LuaDLL.luaL_throw(L, "invalid arguments to method: RecordTable.SetRecord")); } } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }