public static Delegate Game_Loader_WWWProgress(LuaFunction func)
    {
        if (func == null)
        {
            Game.Loader.WWWProgress fn = delegate { };
            return(fn);
        }

        Game.Loader.WWWProgress d = (new Game_Loader_WWWProgress_Event(func)).Call;
        return(d);
    }
예제 #2
0
    static int Load(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 5 && TypeChecker.CheckTypes(L, 1, typeof(Game.Loader), typeof(string), typeof(Game.Loader.WWWCallback), typeof(Game.Loader.WWWProgress), typeof(UnityEngine.WWWForm)))
            {
                Game.Loader             obj       = (Game.Loader)ToLua.ToObject(L, 1);
                string                  arg0      = ToLua.ToString(L, 2);
                Game.Loader.WWWCallback arg1      = null;
                LuaTypes                funcType3 = LuaDLL.lua_type(L, 3);

                if (funcType3 != LuaTypes.LUA_TFUNCTION)
                {
                    arg1 = (Game.Loader.WWWCallback)ToLua.ToObject(L, 3);
                }
                else
                {
                    LuaFunction func = ToLua.ToLuaFunction(L, 3);
                    arg1 = DelegateFactory.CreateDelegate(typeof(Game.Loader.WWWCallback), func) as Game.Loader.WWWCallback;
                }

                Game.Loader.WWWProgress arg2 = null;
                LuaTypes funcType4           = LuaDLL.lua_type(L, 4);

                if (funcType4 != LuaTypes.LUA_TFUNCTION)
                {
                    arg2 = (Game.Loader.WWWProgress)ToLua.ToObject(L, 4);
                }
                else
                {
                    LuaFunction func = ToLua.ToLuaFunction(L, 4);
                    arg2 = DelegateFactory.CreateDelegate(typeof(Game.Loader.WWWProgress), func) as Game.Loader.WWWProgress;
                }

                UnityEngine.WWWForm arg3 = (UnityEngine.WWWForm)ToLua.ToObject(L, 5);
                obj.Load(arg0, arg1, arg2, arg3);
                return(0);
            }
            else if (count == 6 && TypeChecker.CheckTypes(L, 1, typeof(Game.Loader), typeof(string), typeof(Game.Loader.WWWCallback), typeof(string), typeof(Game.Loader.WWWProgress), typeof(UnityEngine.WWWForm)))
            {
                Game.Loader             obj       = (Game.Loader)ToLua.ToObject(L, 1);
                string                  arg0      = ToLua.ToString(L, 2);
                Game.Loader.WWWCallback arg1      = null;
                LuaTypes                funcType3 = LuaDLL.lua_type(L, 3);

                if (funcType3 != LuaTypes.LUA_TFUNCTION)
                {
                    arg1 = (Game.Loader.WWWCallback)ToLua.ToObject(L, 3);
                }
                else
                {
                    LuaFunction func = ToLua.ToLuaFunction(L, 3);
                    arg1 = DelegateFactory.CreateDelegate(typeof(Game.Loader.WWWCallback), func) as Game.Loader.WWWCallback;
                }

                string arg2 = ToLua.ToString(L, 4);
                Game.Loader.WWWProgress arg3 = null;
                LuaTypes funcType5           = LuaDLL.lua_type(L, 5);

                if (funcType5 != LuaTypes.LUA_TFUNCTION)
                {
                    arg3 = (Game.Loader.WWWProgress)ToLua.ToObject(L, 5);
                }
                else
                {
                    LuaFunction func = ToLua.ToLuaFunction(L, 5);
                    arg3 = DelegateFactory.CreateDelegate(typeof(Game.Loader.WWWProgress), func) as Game.Loader.WWWProgress;
                }

                UnityEngine.WWWForm arg4 = (UnityEngine.WWWForm)ToLua.ToObject(L, 6);
                obj.Load(arg0, arg1, arg2, arg3, arg4);
                return(0);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: Game.Loader.Load"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }