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


                ABManager gen_to_be_invoked = (ABManager)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 <System.Action <AssetItem> >(L, 3) && translator.Assignable <System.Action>(L, 4))
                {
                    string _fullPath = LuaAPI.lua_tostring(L, 2);
                    System.Action <AssetItem> _successCall = translator.GetDelegate <System.Action <AssetItem> >(L, 3);
                    System.Action             _failCall    = translator.GetDelegate <System.Action>(L, 4);

                    gen_to_be_invoked.LoadAssetAsync(_fullPath, _successCall, _failCall);



                    return(0);
                }
                if (gen_param_count == 3 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING) && translator.Assignable <System.Action <AssetItem> >(L, 3))
                {
                    string _fullPath = LuaAPI.lua_tostring(L, 2);
                    System.Action <AssetItem> _successCall = translator.GetDelegate <System.Action <AssetItem> >(L, 3);

                    gen_to_be_invoked.LoadAssetAsync(_fullPath, _successCall);



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

            return(LuaAPI.luaL_error(L, "invalid arguments to ABManager.LoadAssetAsync!"));
        }