예제 #1
0
        protected void SignalCallBack(object touchObject)
        {
            UITouchObject o = touchObject as UITouchObject;

            if (o != null)
            {
                ReturnInstantiatedObject("Touch_Effect", o.gameObject);
            }
        }
예제 #2
0
        public void ShowEffect(Vector2 pos)
        {
            GameObject o = GetInstantiatedObject("Touch_Effect", m_pRootObject.transform);

            if (o != null)
            {
                UITouchObject touchObject = o.GetComponent <UITouchObject>();
                touchObject.Activate(0.8f, SignalCallBack);

                RectTransform rt = o.GetComponent <RectTransform> ();
                rt.anchoredPosition = pos;
                o.SetActive(true);
            }
        }