private void ProcessTap(Axis axis, float axisVal, Vector2 tapVelocity) { lastTapTime = Time.time; wasLastFrameInput = true; if (++currentTapCount == tapsRequired) { Debug.Log(currentTapCount + " taps on axis: " + axis + " with direction: " + tapVelocity); OnTapCountMet(tapVelocity); Reset(); } else { prevAxis = axis; prevVelocity = axisVal > 0f ? TapVelocity.Positive : TapVelocity.Negative; } }
private void Reset() { currentTapCount = 0; prevVelocity = TapVelocity.None; prevAxis = Axis.None; }