Пример #1
0
        public static ClickEventListener Get(GameObject obj)
        {
            ClickEventListener listener = obj.GetComponent <ClickEventListener>();

            if (listener == null)
            {
                listener = obj.AddComponent <ClickEventListener>();
            }
            return(listener);
        }
Пример #2
0
        public void Init()
        {
            ClickEventListener listener = ClickEventListener.Get(mStarIcon.gameObject);

            listener.SetClickEventHandler(OnStarClicked);
        }