Beispiel #1
0
    private static void notifyfuncs(EventSystem eventSystem, PointerEventData eventData,
                                    GameObject target, PointerState pointerStat)
    {
        //////////////////////Call the int parameter//////////////////////
        PointerCounterEventData eventParam1 = new PointerCounterEventData(
            eventSystem,
            eventData.pointerId,
            pointerStat);

        ExecuteEvents.Execute <IPointerCounterHandler>(
            target,
            eventParam1,
            PointerCounterEventData.counterChangedV1Delegate);

        //////////////////////Call the PointerCounterEventData parameter//////////////////////
        PointerCounterEventData eventParam2 = new PointerCounterEventData(
            eventSystem,
            eventData,
            pointerStat,
            target);

        ExecuteEvents.Execute <IPointerCounterHandler>(
            target,
            eventParam2,
            PointerCounterEventData.counterChangedV2Delegate);
    }
    public void OnPointerCounterChanged(PointerCounterEventData touchCountData)
    {
        PointerCounterInfo moreEventData = touchCountData.touchCountData;

        Debug.Log("Finger TouchCount: " + moreEventData.touchCount);
        Debug.Log("Finger PointerId: " + moreEventData.pointerId);
        Debug.Log("Finger Pointer State: " + moreEventData.pointerState);
        Debug.Log("Finger Target: " + moreEventData.target.name);

        //Can also access PointerEventData
        PointerEventData eventData = touchCountData.touchCountData.eventData;

        Debug.Log("Click Time!: " + eventData.clickTime);
    }
 public void OnPointerUp(PointerEventData eventData)
 {
     PointerCounterEventData.notifyPointerUp(EventSystem.current, eventData, this.gameObject);
 }