public bool GetDirectionDown(InputSourceAxisDownDirection direction) { switch (direction) { case InputSourceAxisDownDirection.Right: return(isRightDown); case InputSourceAxisDownDirection.Left: return(isLeftDown); case InputSourceAxisDownDirection.Up: return(isUpDown); case InputSourceAxisDownDirection.Down: return(isDownDown); default: return(false); } }
private bool CheckDoubleDirectionForDirection(InputSourceAxisDownDirection direction, bool hasPreviousTap) { if (directionControl.GetDirectionDown(direction)) { if (hasPreviousTap && tappedDirection == direction) { ++tapCount; } else { tappedDirection = direction; tapCount = 1; } directionCooler = directionKeyCooler; return(true); } return(false); }
private void ResetDoubleDirection() { tapCount = 0; directionCooler = 0; tappedDirection = InputSourceAxisDownDirection.None; }