示例#1
0
    protected virtual void OnUIPress(EventMessage em, ref object paramRef)
    {
        switch (type)
        {
        case UIEventType.CLICK:
            if (!em.paramBool)
            {
                eventArray.Broadcast(this);
            }
            break;

        case UIEventType.DOWN:
            eventArray.Broadcast(this);
            break;
        }
    }
示例#2
0
    private void Press()
    {
        // prevent Timer error
        if (this == null)
        {
            return;
        }

        if (!IsActive())
        {
            return;
        }

        // click event
        m_OnClick.Invoke();

        // trigger event
        m_triggerEvent.Invoke(pointerEventData);

        // string event
        eventArray.Broadcast(this);
    }
示例#3
0
 public void DoEvent()
 {
     eventArray.Broadcast(this);
 }
示例#4
0
 protected override void OnTriggerExit(Collider coll)
 {
     base.OnTriggerExit(coll);
     onLeave.Broadcast(coll.gameObject);
 }
示例#5
0
 protected override void OnTriggerEnter(Collider coll)
 {
     base.OnTriggerEnter(coll);
     onEnter.Broadcast(coll.gameObject);
 }