Exemplo n.º 1
0
    static int LoadScene(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 5 && TypeChecker.CheckTypes(L, 1, typeof(LuaFramework.LoaderManager), typeof(string), typeof(LuaInterface.LuaFunction), typeof(LuaInterface.LuaFunction), typeof(bool)))
            {
                LuaFramework.LoaderManager obj = (LuaFramework.LoaderManager)ToLua.ToObject(L, 1);
                string      arg0 = ToLua.ToString(L, 2);
                LuaFunction arg1 = ToLua.ToLuaFunction(L, 3);
                LuaFunction arg2 = ToLua.ToLuaFunction(L, 4);
                bool        arg3 = LuaDLL.lua_toboolean(L, 5);
                obj.LoadScene(arg0, arg1, arg2, arg3);
                return(0);
            }
            else if (count == 5 && TypeChecker.CheckTypes(L, 1, typeof(LuaFramework.LoaderManager), typeof(string), typeof(System.Action <string>), typeof(System.Action <float>), typeof(bool)))
            {
                LuaFramework.LoaderManager obj = (LuaFramework.LoaderManager)ToLua.ToObject(L, 1);
                string arg0 = ToLua.ToString(L, 2);
                System.Action <string> arg1 = null;
                LuaTypes funcType3          = LuaDLL.lua_type(L, 3);

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

                System.Action <float> arg2 = null;
                LuaTypes funcType4         = LuaDLL.lua_type(L, 4);

                if (funcType4 != LuaTypes.LUA_TFUNCTION)
                {
                    arg2 = (System.Action <float>)ToLua.ToObject(L, 4);
                }
                else
                {
                    LuaFunction func = ToLua.ToLuaFunction(L, 4);
                    arg2 = DelegateFactory.CreateDelegate(typeof(System.Action <float>), func) as System.Action <float>;
                }

                bool arg3 = LuaDLL.lua_toboolean(L, 5);
                obj.LoadScene(arg0, arg1, arg2, arg3);
                return(0);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: LuaFramework.LoaderManager.LoadScene"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
Exemplo n.º 2
0
 static int GetLoaderManager(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 0);
         LuaFramework.LoaderManager o = LuaFramework.LuaHelper.GetLoaderManager();
         ToLua.Push(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Exemplo n.º 3
0
 static int CacheAssetBundleLoaderData(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 3);
         LuaFramework.LoaderManager obj = (LuaFramework.LoaderManager)ToLua.CheckObject(L, 1, typeof(LuaFramework.LoaderManager));
         string arg0 = ToLua.CheckString(L, 2);
         string arg1 = ToLua.CheckString(L, 3);
         obj.CacheAssetBundleLoaderData(arg0, arg1);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Exemplo n.º 4
0
 static int IsLoaded(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 3);
         LuaFramework.LoaderManager obj = (LuaFramework.LoaderManager)ToLua.CheckObject(L, 1, typeof(LuaFramework.LoaderManager));
         string arg0 = ToLua.CheckString(L, 2);
         string arg1 = ToLua.CheckString(L, 3);
         bool   o    = obj.IsLoaded(arg0, arg1);
         LuaDLL.lua_pushboolean(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }