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

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

            if (tmp != null)
            {
                tmp.AddToggleListener(action);
            }
        }
Exemple #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);
            }
        }
Exemple #4
0
        public void SetRawImage(string componentName, Texture spr)
        {
            UIBehaviour tmp = GetGameObject <UIBehaviour>(componentName);

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

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

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