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


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


            int __gen_param_count = LuaAPI.lua_gettop(L);

            try {
                if (__gen_param_count == 2 && LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 2))
                {
                    bool doAll = LuaAPI.lua_toboolean(L, 2);

                    __cl_gen_to_be_invoked.UpdateUnitCache(doAll);



                    return(0);
                }
                if (__gen_param_count == 3 && LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 2) && translator.Assignable <xc.ActorManager.UnitCacheDataFilter>(L, 3))
                {
                    bool doAll = LuaAPI.lua_toboolean(L, 2);
                    xc.ActorManager.UnitCacheDataFilter filter = translator.GetDelegate <xc.ActorManager.UnitCacheDataFilter>(L, 3);

                    __cl_gen_to_be_invoked.UpdateUnitCache(doAll, filter);



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

            return(LuaAPI.luaL_error(L, "invalid arguments to xc.ActorManager.UpdateUnitCache!"));
        }
Exemplo n.º 2
0
        static int _m_RemoveUnitCacheData(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


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


            try {
                {
                    xc.ActorManager.UnitCacheDataFilter func = translator.GetDelegate <xc.ActorManager.UnitCacheDataFilter>(L, 2);

                    bool __cl_gen_ret = __cl_gen_to_be_invoked.RemoveUnitCacheData(func);
                    LuaAPI.lua_pushboolean(L, __cl_gen_ret);



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