static int set_onClick(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); testBehaviour obj = (testBehaviour)o; testBehaviour.VoidDelegate arg0 = null; LuaTypes funcType2 = LuaDLL.lua_type(L, 2); if (funcType2 != LuaTypes.LUA_TFUNCTION) { arg0 = (testBehaviour.VoidDelegate)ToLua.CheckObject(L, 2, typeof(testBehaviour.VoidDelegate)); } else { LuaFunction func = ToLua.ToLuaFunction(L, 2); arg0 = DelegateFactory.CreateDelegate(typeof(testBehaviour.VoidDelegate), func) as testBehaviour.VoidDelegate; } obj.onClick = arg0; return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index onClick on a nil value" : e.Message)); } }
static int get_onClick(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); testBehaviour obj = (testBehaviour)o; testBehaviour.VoidDelegate ret = obj.onClick; ToLua.Push(L, ret); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index onClick on a nil value" : e.Message)); } }
static int get_name(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); testBehaviour obj = (testBehaviour)o; string ret = obj.name; LuaDLL.lua_pushstring(L, ret); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index name on a nil value" : e.Message)); } }
static int set_name(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); testBehaviour obj = (testBehaviour)o; string arg0 = ToLua.CheckString(L, 2); obj.name = arg0; return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index name on a nil value" : e.Message)); } }