Example #1
0
        static public PointerClickListener Get(GameObject go)
        {
            PointerClickListener listener = go.GetComponent <PointerClickListener>();

            if (listener == null)
            {
                listener = go.AddComponent <PointerClickListener>();
            }
            return(listener);
        }
Example #2
0
 public static void UpdatePointerClickListener(bool isAdd, GameObject go, PointerClickListener.VoidDelegate listener)
 {
     if (isAdd)
     {
         PointerClickListener.Get(go).onClick = listener;
     }
     else
     {
         PointerClickListener.Get(go).onClick = null;
     }
 }