예제 #1
0
        public void AddInputFieldEndEditListener(string componentName, UnityAction <string> action)
        {
            UIBehaviour tmp = GetGameObject <UIBehaviour>(componentName);

            if (tmp != null)
            {
                tmp.AddInputFieldEndEditListener(action);
            }
        }
예제 #2
0
        public void AddToggleListener(string componentName, UnityAction <bool> action)
        {
            UIBehaviour tmp = GetGameObject <UIBehaviour>(componentName);

            if (tmp != null)
            {
                tmp.AddToggleListener(action);
            }
        }
예제 #3
0
        /// <summary>
        /// 接口监听事件
        /// </summary>
        /// <param name="componentName">组件名字</param>
        /// <param name="eventType">继承接口类型</param>
        /// <param name="action">回调</param>
        public void OnEventHandler(string componentName, EventTriggerType eventType, UnityAction <BaseEventData> action)
        {
            UIBehaviour tmp = GetGameObject <UIBehaviour>(componentName);

            if (tmp != null)
            {
                tmp.EventHandler(eventType, action);
            }
        }
예제 #4
0
        public void SetRawImage(string componentName, Texture spr)
        {
            UIBehaviour tmp = GetGameObject <UIBehaviour>(componentName);

            if (tmp != null)
            {
                tmp.SetRawImage(spr);
            }
        }
예제 #5
0
        public void SetText(string componentName, string str)
        {
            UIBehaviour tmp = GetGameObject <UIBehaviour>(componentName);

            if (tmp != null)
            {
                tmp.SetText(str);
            }
        }
예제 #6
0
        public void AddSliderListener(string componentName, UnityAction <float> action)
        {
            UIBehaviour tmp = GetGameObject <UIBehaviour>(componentName);

            if (tmp != null)
            {
                tmp.AddSliderListener(action);
            }
        }