示例#1
0
        static int _m_Init(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                AssetBundles.AssetBundleAsyncLoader gen_to_be_invoked = (AssetBundles.AssetBundleAsyncLoader)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 <string[]>(L, 3) && translator.Assignable <System.Action <UnityEngine.AssetBundle> >(L, 4))
                {
                    string   _name        = LuaAPI.lua_tostring(L, 2);
                    string[] _dependances = (string[])translator.GetObject(L, 3, typeof(string[]));
                    System.Action <UnityEngine.AssetBundle> _callBack = translator.GetDelegate <System.Action <UnityEngine.AssetBundle> >(L, 4);

                    gen_to_be_invoked.Init(_name, _dependances, _callBack);



                    return(0);
                }
                if (gen_param_count == 3 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING) && translator.Assignable <string[]>(L, 3))
                {
                    string   _name        = LuaAPI.lua_tostring(L, 2);
                    string[] _dependances = (string[])translator.GetObject(L, 3, typeof(string[]));

                    gen_to_be_invoked.Init(_name, _dependances);



                    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.AssetBundleAsyncLoader.Init!"));
        }
示例#2
0
        static int _m_Init(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


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



                {
                    string   _name        = LuaAPI.lua_tostring(L, 2);
                    string[] _dependances = (string[])translator.GetObject(L, 3, typeof(string[]));

                    gen_to_be_invoked.Init(_name, _dependances);



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