public static int CheckNextPreviousKeys(this KeyboardState keyboard, Keys next, Keys previous, TimeSpan repeatTime, GameTime gameTime, ref TimeSpan lastNext, ref TimeSpan lastPrevious) { int value = 0; if (keyboard.CheckRepeat(next, gameTime, ref lastNext, repeatTime)) { value++; } if (keyboard.CheckRepeat(previous, gameTime, ref lastPrevious, repeatTime)) { value--; } return(value); }