static int _s_set_heroController(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); HeroScoreComponent gen_to_be_invoked = (HeroScoreComponent)translator.FastGetCSObj(L, 1); gen_to_be_invoked.heroController = (HeroController)translator.GetObject(L, 2, typeof(HeroController)); } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } return(0); }
static int _g_get_score(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); HeroScoreComponent gen_to_be_invoked = (HeroScoreComponent)translator.FastGetCSObj(L, 1); LuaAPI.lua_pushnumber(L, gen_to_be_invoked.score); } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } return(1); }
static int __CreateInstance(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); if (LuaAPI.lua_gettop(L) == 1) { HeroScoreComponent gen_ret = new HeroScoreComponent(); 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 HeroScoreComponent constructor!")); }
static int _m_AddMoveDistance(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); HeroScoreComponent gen_to_be_invoked = (HeroScoreComponent)translator.FastGetCSObj(L, 1); { float _delta = (float)LuaAPI.lua_tonumber(L, 2); gen_to_be_invoked.AddMoveDistance(_delta); return(0); } } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } }
static int _m_SetCalculateDistanceScoreState(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); HeroScoreComponent gen_to_be_invoked = (HeroScoreComponent)translator.FastGetCSObj(L, 1); { bool _enable = LuaAPI.lua_toboolean(L, 2); gen_to_be_invoked.SetCalculateDistanceScoreState(_enable); return(0); } } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } }
static int _m_AddCoin(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); HeroScoreComponent gen_to_be_invoked = (HeroScoreComponent)translator.FastGetCSObj(L, 1); { float _coinScore = (float)LuaAPI.lua_tonumber(L, 2); PropController _propController = (PropController)translator.GetObject(L, 3, typeof(PropController)); gen_to_be_invoked.AddCoin(_coinScore, _propController); return(0); } } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } }