static int _e_eventHandle(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); int gen_param_count = LuaAPI.lua_gettop(L); TestCS gen_to_be_invoked = (TestCS)translator.FastGetCSObj(L, 1); TestCS.EventHandle gen_delegate = translator.GetDelegate <TestCS.EventHandle>(L, 3); if (gen_delegate == null) { return(LuaAPI.luaL_error(L, "#3 need TestCS.EventHandle!")); } if (gen_param_count == 3) { if (LuaAPI.xlua_is_eq_str(L, 2, "+")) { gen_to_be_invoked.eventHandle += gen_delegate; return(0); } if (LuaAPI.xlua_is_eq_str(L, 2, "-")) { gen_to_be_invoked.eventHandle -= gen_delegate; return(0); } } } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } LuaAPI.luaL_error(L, "invalid arguments to TestCS.eventHandle!"); return(0); }
static int _s_set_id(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); TestCS gen_to_be_invoked = (TestCS)translator.FastGetCSObj(L, 1); gen_to_be_invoked.id = LuaAPI.xlua_tointeger(L, 2); } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } return(0); }
static int __CreateInstance(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); if (LuaAPI.lua_gettop(L) == 1) { TestCS gen_ret = new TestCS(); 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 TestCS constructor!")); }
static int _m_Add_xlua_st_(RealStatePtr L) { try { { int _a = LuaAPI.xlua_tointeger(L, 1); int _b = LuaAPI.xlua_tointeger(L, 2); int gen_ret = TestCS.Add(_a, _b); LuaAPI.xlua_pushinteger(L, gen_ret); return(1); } } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } }
static int _m_LoadAssetAsync3_xlua_st_(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); { System.Action _callBack = translator.GetDelegate <System.Action>(L, 1); TestCS.LoadAssetAsync3(_callBack); return(0); } } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } }
static int _m_Log_xlua_st_(RealStatePtr L) { try { int gen_param_count = LuaAPI.lua_gettop(L); if (gen_param_count == 2 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1) && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING)) { int _id = LuaAPI.xlua_tointeger(L, 1); string _name = LuaAPI.lua_tostring(L, 2); TestCS.Log(_id, _name); return(0); } if (gen_param_count == 1 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1)) { int _id = LuaAPI.xlua_tointeger(L, 1); TestCS.Log(_id); return(0); } if (gen_param_count == 0) { TestCS.Log( ); return(0); } } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } return(LuaAPI.luaL_error(L, "invalid arguments to TestCS.Log!")); }