コード例 #1
0
    static int RecordConfigTextFile(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 2 && TypeChecker.CheckTypes <GameFramework.Dictionary <string, string> >(L, 2))
            {
                string arg0 = ToLua.CheckString(L, 1);
                GameFramework.Dictionary <string, string> arg1 = (GameFramework.Dictionary <string, string>)ToLua.ToObject(L, 2);
                GameFramework.Utility.RecordConfigTextFile(arg0, arg1);
                return(0);
            }
            else if (count == 2 && TypeChecker.CheckTypes <string>(L, 2))
            {
                string arg0 = ToLua.CheckString(L, 1);
                string arg1 = ToLua.ToString(L, 2);
                GameFramework.Utility.RecordConfigTextFile(arg0, arg1);
                return(0);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: GameFramework.Utility.RecordConfigTextFile"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
コード例 #2
0
    static int SetRunningData(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 1)
            {
                GameFramework.Dictionary <string, string> arg0 = (GameFramework.Dictionary <string, string>)ToLua.CheckObject <GameFramework.Dictionary <string, string> >(L, 1);
                GameFramework.RunningTimeData.SetRunningData(arg0);
                return(0);
            }
            else if (count == 3)
            {
                string arg0 = ToLua.CheckString(L, 1);
                string arg1 = ToLua.CheckString(L, 2);
                bool   arg2 = LuaDLL.luaL_checkboolean(L, 3);
                GameFramework.RunningTimeData.SetRunningData(arg0, arg1, arg2);
                return(0);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: GameFramework.RunningTimeData.SetRunningData"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
コード例 #3
0
 static int DepartDictionaryByLines(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         string arg0 = ToLua.CheckString(L, 1);
         GameFramework.Dictionary <string, string> o = GameFramework.Utility.DepartDictionaryByLines(arg0);
         ToLua.PushObject(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }