Example #1
0
        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;
            }
        }
Example #2
0
 private void Reset()
 {
     currentTapCount = 0;
     prevVelocity    = TapVelocity.None;
     prevAxis        = Axis.None;
 }