예제 #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);
     }
 }
예제 #2
0
파일: TestTwo.cs 프로젝트: MohanLi/Demo
 void ButtonEvent(EventTriggerListener listener, object args, params object[] objParams)
 {
     Debug.Log("ButtonEvent");
     UIManager.Instance.OpenUICloseOthers(EnumUIType.TestOne);
 }
예제 #3
0
 protected void RegisterBtnOnClick(Transform btn, EventTriggerListener.VoidDelegate del)
 {
     EventTriggerListener.Get(btn?.gameObject).onClick = del;
 }
예제 #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;
        }
예제 #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;
        }