private IEnumerator MFTapCoroutine(Tap tap) { yield return(new WaitForSeconds((float)maxMultiTapCount * maxMultiTapInterval)); if (MFtapExisted == tap.count) { MFtapExisted = 0; if (IT_Gesture.onMFMultiTapE != null) { IT_Gesture.onMFMultiTapE(tap); } } }
private void CheckMFMultiTap(Tap tap) { MFtapExisted++; if (tap.count == maxMultiTapCount) { MFtapExisted = 0; if (IT_Gesture.onMFMultiTapE != null) { IT_Gesture.onMFMultiTapE(tap); } } else { StartCoroutine(MFTapCoroutine(tap)); } }
public static void MultiTap(Tap tap) { if (tap.fingerCount == 1) { if (tap.count == 1) { if (IT_Gesture.onShortTapE != null) { IT_Gesture.onShortTapE(tap.pos); } } else if (tap.count == 2 && IT_Gesture.onDoubleTapE != null) { IT_Gesture.onDoubleTapE(tap.pos); } if (instance.enableMultiTapFilter) { instance.CheckMultiTap(tap); } else if (IT_Gesture.onMultiTapE != null) { IT_Gesture.onMultiTapE(tap); } return; } if (tap.fingerCount == 2) { if (tap.count == 1) { DFShortTap(tap.pos); } else if (tap.count == 2) { DFDoubleTap(tap.pos); } } if (instance.enableMultiTapFilter) { instance.CheckMFMultiTap(tap); } else if (IT_Gesture.onMFMultiTapE != null) { IT_Gesture.onMFMultiTapE(tap); } }