Ejemplo n.º 1
0
        static int _m_Init(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                AssetBundles.AssetAsyncLoader gen_to_be_invoked = (AssetBundles.AssetAsyncLoader)translator.FastGetCSObj(L, 1);


                int gen_param_count = LuaAPI.lua_gettop(L);

                if (gen_param_count == 4 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING) && translator.Assignable <UnityEngine.Object>(L, 3) && translator.Assignable <System.Action <UnityEngine.Object> >(L, 4))
                {
                    string             _assetName = LuaAPI.lua_tostring(L, 2);
                    UnityEngine.Object _asset     = (UnityEngine.Object)translator.GetObject(L, 3, typeof(UnityEngine.Object));
                    System.Action <UnityEngine.Object> _callBack = translator.GetDelegate <System.Action <UnityEngine.Object> >(L, 4);

                    gen_to_be_invoked.Init(_assetName, _asset, _callBack);



                    return(0);
                }
                if (gen_param_count == 4 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING) && translator.Assignable <AssetBundles.BaseAssetBundleAsyncLoader>(L, 3) && translator.Assignable <System.Action <UnityEngine.Object> >(L, 4))
                {
                    string _assetName = LuaAPI.lua_tostring(L, 2);
                    AssetBundles.BaseAssetBundleAsyncLoader _loader   = (AssetBundles.BaseAssetBundleAsyncLoader)translator.GetObject(L, 3, typeof(AssetBundles.BaseAssetBundleAsyncLoader));
                    System.Action <UnityEngine.Object>      _callBack = translator.GetDelegate <System.Action <UnityEngine.Object> >(L, 4);

                    gen_to_be_invoked.Init(_assetName, _loader, _callBack);



                    return(0);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }

            return(LuaAPI.luaL_error(L, "invalid arguments to AssetBundles.AssetAsyncLoader.Init!"));
        }
Ejemplo n.º 2
0
        static int _m_LoadAssetBundleAsync(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                AssetBundles.AssetBundleManager gen_to_be_invoked = (AssetBundles.AssetBundleManager)translator.FastGetCSObj(L, 1);


                int gen_param_count = LuaAPI.lua_gettop(L);

                if (gen_param_count == 3 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING) && translator.Assignable <System.Action <UnityEngine.Object> >(L, 3))
                {
                    string _assetbundleName = LuaAPI.lua_tostring(L, 2);
                    System.Action <UnityEngine.Object> _callBack = translator.GetDelegate <System.Action <UnityEngine.Object> >(L, 3);

                    AssetBundles.BaseAssetBundleAsyncLoader gen_ret = gen_to_be_invoked.LoadAssetBundleAsync(_assetbundleName, _callBack);
                    translator.Push(L, gen_ret);



                    return(1);
                }
                if (gen_param_count == 2 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING))
                {
                    string _assetbundleName = LuaAPI.lua_tostring(L, 2);

                    AssetBundles.BaseAssetBundleAsyncLoader gen_ret = gen_to_be_invoked.LoadAssetBundleAsync(_assetbundleName);
                    translator.Push(L, gen_ret);



                    return(1);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }

            return(LuaAPI.luaL_error(L, "invalid arguments to AssetBundles.AssetBundleManager.LoadAssetBundleAsync!"));
        }