Exemplo n.º 1
0
 /// <summary>
 /// 触发事件
 /// </summary>
 /// <param name="listener"></param>
 /// <param name="args"></param>
 public void TriggerHandle(EventTriggerListener listener, object args)
 {
     if (null != eventHandle)
     {
         eventHandle(listener, args, handleParams);
     }
 }
Exemplo n.º 2
0
 void ButtonEvent(EventTriggerListener listener, object args, params object[] objParams)
 {
     Debug.Log("ButtonEvent");
     UIManager.Instance.OpenUICloseOthers(EnumUIType.TestOne);
 }
Exemplo n.º 3
0
 protected void RegisterBtnOnClick(Transform btn, EventTriggerListener.VoidDelegate del)
 {
     EventTriggerListener.Get(btn?.gameObject).onClick = del;
 }
Exemplo n.º 4
0
        /// <summary>
        /// 注册滑动条
        /// </summary>
        /// <param name="sliderName"></param>
        /// <param name="del"></param>
        protected void RegisterSlider(string sliderName, EventTriggerListener.VoidDelegate del)
        {
            Transform slider = UnityHelper.Find(gameObject.transform, sliderName);

            EventTriggerListener.Get(slider?.gameObject).onUp = del;
        }
Exemplo n.º 5
0
        /// <summary>
        /// 注册按钮事件
        /// </summary>
        /// <param name="btnName"></param>
        /// <param name="del"></param>
        protected void RegisterBtnOnClick(string btnName, EventTriggerListener.VoidDelegate del)
        {
            Transform btn = UnityHelper.Find(gameObject.transform, btnName);

            EventTriggerListener.Get(btn?.gameObject).onClick = del;
        }