static public UUIEventListener Get(GameObject go) { UUIEventListener listener = go.GetComponent <UUIEventListener>(); if (listener == null) { listener = go.AddComponent <UUIEventListener>(); } return(listener); }
protected bool RegisterClickEvent(string btnName, UUIEventListener.VoidDelegate clickEvent) { GameObject btn = HelperAboutUnity.FindChildNode(this.gameObject, btnName); if (null != btn) { UUIEventListener.Get(btn).onClick = clickEvent; return(true); } return(false); }
static public void OnLongPress(GameObject go, UUIEventListener.VoidDelegate voidDelegate) { UUIEventListener.Get(go).onLongPressDown = voidDelegate; }
static public void OnDoubleClick(GameObject go, UUIEventListener.VoidDelegate voidDelegate) { UUIEventListener.Get(go).onDoubleClick = voidDelegate; }