static public UUIEventListener Get(GameObject go)
        {
            UUIEventListener listener = go.GetComponent <UUIEventListener>();

            if (listener == null)
            {
                listener = go.AddComponent <UUIEventListener>();
            }
            return(listener);
        }
Exemple #2
0
        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);
        }
Exemple #3
0
 static public void OnLongPress(GameObject go, UUIEventListener.VoidDelegate voidDelegate)
 {
     UUIEventListener.Get(go).onLongPressDown = voidDelegate;
 }
Exemple #4
0
 static public void OnDoubleClick(GameObject go, UUIEventListener.VoidDelegate voidDelegate)
 {
     UUIEventListener.Get(go).onDoubleClick = voidDelegate;
 }