| | |
| | | { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | System.Type type = typeof(LuaBehaviour); |
| | | Utils.BeginObjectRegister(type, L, translator, 0, 0, 2, 2); |
| | | Utils.BeginObjectRegister(type, L, translator, 0, 0, 1, 1); |
| | | |
| | | |
| | | |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "luaScript", _g_get_luaScript); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "injections", _g_get_injections); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "fileName", _g_get_fileName); |
| | | |
| | | Utils.RegisterFunc(L, Utils.SETTER_IDX, "luaScript", _s_set_luaScript); |
| | | Utils.RegisterFunc(L, Utils.SETTER_IDX, "injections", _s_set_injections); |
| | | Utils.RegisterFunc(L, Utils.SETTER_IDX, "fileName", _s_set_fileName); |
| | | |
| | | |
| | | Utils.EndObjectRegister(type, L, translator, null, null, |
| | |
| | | |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_luaScript(RealStatePtr L) |
| | | static int _g_get_fileName(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | LuaBehaviour gen_to_be_invoked = (LuaBehaviour)translator.FastGetCSObj(L, 1); |
| | | translator.Push(L, gen_to_be_invoked.luaScript); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_injections(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | LuaBehaviour gen_to_be_invoked = (LuaBehaviour)translator.FastGetCSObj(L, 1); |
| | | translator.Push(L, gen_to_be_invoked.injections); |
| | | LuaAPI.lua_pushstring(L, gen_to_be_invoked.fileName); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | |
| | | |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _s_set_luaScript(RealStatePtr L) |
| | | static int _s_set_fileName(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | LuaBehaviour gen_to_be_invoked = (LuaBehaviour)translator.FastGetCSObj(L, 1); |
| | | gen_to_be_invoked.luaScript = (UnityEngine.TextAsset)translator.GetObject(L, 2, typeof(UnityEngine.TextAsset)); |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 0; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _s_set_injections(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | LuaBehaviour gen_to_be_invoked = (LuaBehaviour)translator.FastGetCSObj(L, 1); |
| | | gen_to_be_invoked.injections = (Injection[])translator.GetObject(L, 2, typeof(Injection[])); |
| | | gen_to_be_invoked.fileName = LuaAPI.lua_tostring(L, 2); |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |