Example #1
0
 /// <summary>
 /// 执行事件处理器方法
 /// </summary>
 /// <param name="id">触发事件</param>
 /// <param name="eventData">UI事件数据</param>
 private void Execute(STriggerExecuteParam eventData)
 {
     for (int i = 0, imax = Triggers.Count; i < imax; ++i)
     {
         var ent = Triggers[i];
         if (ent.eventID == eventData.TriggerType)
         {
             ent.Execute(eventData);
         }
     }
 }
Example #2
0
 public void Execute(STriggerExecuteParam _executeParam)
 {
     if (m_EventHandlerList == null)
     {
         return;
     }
     for (int i = 0; i < EventHandlerList.Count; i++)
     {
         EventHandlerList[i].HandlerExecute(_executeParam);
     }
 }
Example #3
0
        public void HandlerExecute(STriggerExecuteParam _executeParam)
        {
            HandlerExecute_EventCallback(_executeParam);

            switch (HandlerType)
            {
            case EEventHandlerType.Sound:
            {
                HandlerExecute_Sound(_executeParam);
            }
            break;

            default:
                break;
            }
        }
Example #4
0
        public void OnCancel(BaseEventData eventData)
        {
            STriggerExecuteParam param = new STriggerExecuteParam(EventTriggerType.Cancel, eventData);

            Execute(param);
        }
Example #5
0
        public void OnSubmit(BaseEventData eventData)
        {
            STriggerExecuteParam param = new STriggerExecuteParam(EventTriggerType.Submit, eventData);

            Execute(param);
        }
Example #6
0
        public void OnMove(AxisEventData eventData)
        {
            STriggerExecuteParam param = new STriggerExecuteParam(EventTriggerType.Move, eventData);

            Execute(param);
        }
Example #7
0
        public void OnDeselect(BaseEventData eventData)
        {
            STriggerExecuteParam param = new STriggerExecuteParam(EventTriggerType.Deselect, eventData);

            Execute(param);
        }
Example #8
0
        public void OnUpdateSelected(BaseEventData eventData)
        {
            STriggerExecuteParam param = new STriggerExecuteParam(EventTriggerType.UpdateSelected, eventData);

            Execute(param);
        }
Example #9
0
        public void OnScroll(PointerEventData eventData)
        {
            STriggerExecuteParam param = new STriggerExecuteParam(EventTriggerType.Scroll, eventData);

            Execute(param);
        }
Example #10
0
        public void OnDrop(PointerEventData eventData)
        {
            STriggerExecuteParam param = new STriggerExecuteParam(EventTriggerType.Drop, eventData);

            Execute(param);
        }
Example #11
0
        public void OnEndDrag(PointerEventData eventData)
        {
            STriggerExecuteParam param = new STriggerExecuteParam(EventTriggerType.EndDrag, eventData);

            Execute(param);
        }
Example #12
0
        public void OnInitializePotentialDrag(PointerEventData eventData)
        {
            STriggerExecuteParam param = new STriggerExecuteParam(EventTriggerType.InitializePotentialDrag, eventData);

            Execute(param);
        }
Example #13
0
        public void OnPointerEnter(PointerEventData eventData)
        {
            STriggerExecuteParam param = new STriggerExecuteParam(EventTriggerType.PointerEnter, eventData);

            Execute(param);
        }
Example #14
0
 private void HandlerExecute_EventCallback(STriggerExecuteParam _executeParam)
 {
     m_eventCallback.Invoke(_executeParam);
 }
Example #15
0
 private void HandlerExecute_Sound(STriggerExecuteParam _executeParam)
 {
     SoundManager.CreateUISound(GetSoundID());
 }