// Update is called once per frame //导出给Lua用 static public UIEventHandle Get(GameObject go) { UIEventHandle listener = go.GetComponent <UIEventHandle>(); if (listener == null) { listener = go.AddComponent <UIEventHandle>(); } return(listener); }
static int Get(IntPtr L) { try { ToLua.CheckArgsCount(L, 1); UnityEngine.GameObject arg0 = (UnityEngine.GameObject)ToLua.CheckObject(L, 1, typeof(UnityEngine.GameObject)); WCG.UIEventHandle o = WCG.UIEventHandle.Get(arg0); ToLua.Push(L, o); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int set_parameter(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); WCG.UIEventHandle obj = (WCG.UIEventHandle)o; object arg0 = ToLua.ToVarObject(L, 2); obj.parameter = arg0; return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index parameter on a nil value")); } }
static int get_parameter(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); WCG.UIEventHandle obj = (WCG.UIEventHandle)o; object ret = obj.parameter; ToLua.Push(L, ret); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index parameter on a nil value")); } }