예제 #1
0
        static int _m_LoadPrefab(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


            xc.ObjCachePoolMgr __cl_gen_to_be_invoked = (xc.ObjCachePoolMgr)translator.FastGetCSObj(L, 1);


            int __gen_param_count = LuaAPI.lua_gettop(L);

            try {
                if (__gen_param_count == 5 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING) && translator.Assignable <xc.ObjCachePoolType>(L, 3) && (LuaAPI.lua_isnil(L, 4) || LuaAPI.lua_type(L, 4) == LuaTypes.LUA_TSTRING) && translator.Assignable <System.Action <object> >(L, 5))
                {
                    string assetPath = LuaAPI.lua_tostring(L, 2);
                    xc.ObjCachePoolType poolType; translator.Get(L, 3, out poolType);
                    string poolKey = LuaAPI.lua_tostring(L, 4);
                    System.Action <object> callBack = translator.GetDelegate <System.Action <object> >(L, 5);

                    System.Collections.IEnumerator __cl_gen_ret = __cl_gen_to_be_invoked.LoadPrefab(assetPath, poolType, poolKey, callBack);
                    translator.Push(L, __cl_gen_ret);



                    return(1);
                }
                if (__gen_param_count == 5 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING) && translator.Assignable <xc.ObjCachePoolType>(L, 3) && (LuaAPI.lua_isnil(L, 4) || LuaAPI.lua_type(L, 4) == LuaTypes.LUA_TSTRING) && translator.Assignable <xc.ObjectWrapper>(L, 5))
                {
                    string assetPath = LuaAPI.lua_tostring(L, 2);
                    xc.ObjCachePoolType poolType; translator.Get(L, 3, out poolType);
                    string           poolKey = LuaAPI.lua_tostring(L, 4);
                    xc.ObjectWrapper prefab  = (xc.ObjectWrapper)translator.GetObject(L, 5, typeof(xc.ObjectWrapper));

                    System.Collections.IEnumerator __cl_gen_ret = __cl_gen_to_be_invoked.LoadPrefab(assetPath, poolType, poolKey, prefab);
                    translator.Push(L, __cl_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 xc.ObjCachePoolMgr.LoadPrefab!"));
        }