示例#1
0
 static int BindDataSourcePlayerData(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         BindDataRoot arg0 = (BindDataRoot)ToLua.CheckUnityObject(L, 1, typeof(BindDataRoot));
         LuaGameHelper.BindDataSourcePlayerData(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
示例#2
0
 static int GetPlayerDataManager(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 0);
         PlayerDataManager o = LuaGameHelper.GetPlayerDataManager();
         ToLua.PushObject(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
示例#3
0
 static int BindDataSource(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 3);
         BindDataRoot arg0 = (BindDataRoot)ToLua.CheckUnityObject(L, 1, typeof(BindDataRoot));
         int          arg1 = (int)LuaDLL.luaL_checknumber(L, 2);
         string       arg2 = ToLua.CheckString(L, 3);
         LuaGameHelper.BindDataSource(arg0, arg1, arg2);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
示例#4
0
    static int ShowMessageBox(IntPtr L)
    {
        try
        {
            ToLua.CheckArgsCount(L, 5);
            MessageBoxType arg0      = (MessageBoxType)ToLua.CheckObject(L, 1, typeof(MessageBoxType));
            string         arg1      = ToLua.CheckString(L, 2);
            string         arg2      = ToLua.CheckString(L, 3);
            System.Action  arg3      = null;
            LuaTypes       funcType4 = LuaDLL.lua_type(L, 4);

            if (funcType4 != LuaTypes.LUA_TFUNCTION)
            {
                arg3 = (System.Action)ToLua.CheckObject(L, 4, typeof(System.Action));
            }
            else
            {
                LuaFunction func = ToLua.ToLuaFunction(L, 4);
                arg3 = DelegateFactory.CreateDelegate(typeof(System.Action), func) as System.Action;
            }

            System.Action arg4      = null;
            LuaTypes      funcType5 = LuaDLL.lua_type(L, 5);

            if (funcType5 != LuaTypes.LUA_TFUNCTION)
            {
                arg4 = (System.Action)ToLua.CheckObject(L, 5, typeof(System.Action));
            }
            else
            {
                LuaFunction func = ToLua.ToLuaFunction(L, 5);
                arg4 = DelegateFactory.CreateDelegate(typeof(System.Action), func) as System.Action;
            }

            LuaGameHelper.ShowMessageBox(arg0, arg1, arg2, arg3, arg4);
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
示例#5
0
    static int SendJason(IntPtr L)
    {
        try
        {
            ToLua.CheckArgsCount(L, 3);
            string arg0 = ToLua.CheckString(L, 1);
            System.Action <int, string> arg1 = null;
            LuaTypes funcType2 = LuaDLL.lua_type(L, 2);

            if (funcType2 != LuaTypes.LUA_TFUNCTION)
            {
                arg1 = (System.Action <int, string>)ToLua.CheckObject(L, 2, typeof(System.Action <int, string>));
            }
            else
            {
                LuaFunction func = ToLua.ToLuaFunction(L, 2);
                arg1 = DelegateFactory.CreateDelegate(typeof(System.Action <int, string>), func) as System.Action <int, string>;
            }

            System.Action <int> arg2      = null;
            LuaTypes            funcType3 = LuaDLL.lua_type(L, 3);

            if (funcType3 != LuaTypes.LUA_TFUNCTION)
            {
                arg2 = (System.Action <int>)ToLua.CheckObject(L, 3, typeof(System.Action <int>));
            }
            else
            {
                LuaFunction func = ToLua.ToLuaFunction(L, 3);
                arg2 = DelegateFactory.CreateDelegate(typeof(System.Action <int>), func) as System.Action <int>;
            }

            LuaGameHelper.SendJason(arg0, arg1, arg2);
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }