internal void RemoveClickEvent(string name)
        {
            AdvGraphicObject obj2 = this.FindObject(name);

            if (obj2 != null)
            {
                IAdvClickEvent componentInChildren = obj2.get_gameObject().GetComponentInChildren <IAdvClickEvent>();
                if (componentInChildren != null)
                {
                    componentInChildren.RemoveClickEvent();
                }
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// クリックイベントを削除
        /// </summary>
        internal void RemoveClickEvent(string name)
        {
            AdvGraphicObject obj = FindObject(name);

            if (obj == null)
            {
                return;
            }

            IAdvClickEvent clickEvent = obj.gameObject.GetComponentInChildren <IAdvClickEvent>();

            if (clickEvent == null)
            {
                return;
            }

            clickEvent.RemoveClickEvent();
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 指定の名前のスプライトにクリックイベントを設定
        /// </summary>
        /// <param name="name"></param>
        internal void AddClickEvent(string name, bool isPolygon, StringGridRow row, UnityAction <BaseEventData> action)
        {
            AdvGraphicObject obj = FindObject(name);

            if (obj == null)
            {
                Debug.LogError("can't find Graphic object" + name);
                return;
            }

            IAdvClickEvent clickEvent = obj.gameObject.GetComponentInChildren <IAdvClickEvent>();

            if (clickEvent == null)
            {
                Debug.LogError("can't find IAdvClickEvent Interface in " + name);
                return;
            }

            clickEvent.AddClickEvent(isPolygon, row, action);
        }
        internal void AddClickEvent(string name, bool isPolygon, StringGridRow row, UnityAction <BaseEventData> action)
        {
            AdvGraphicObject obj2 = this.FindObject(name);

            if (obj2 == null)
            {
                Debug.LogError("can't find Graphic object" + name);
            }
            else
            {
                IAdvClickEvent componentInChildren = obj2.get_gameObject().GetComponentInChildren <IAdvClickEvent>();
                if (componentInChildren == null)
                {
                    Debug.LogError("can't find IAdvClickEvent Interface in " + name);
                }
                else
                {
                    componentInChildren.AddClickEvent(isPolygon, row, action);
                }
            }
        }