I'm trying to make a switch statement for keyboard input:
Code:
switch (newState.IsKeyDown(Keys))
{
case Keys.Up: spritePosition.Y++; break;
case Keys.Down: spritePosition.Y--; break;
case Keys.Right: spritePosition.X++; break;
case Keys.Left: spritePosition.X--; break;
}
Error:
Code:
'Microsoft.Xna.Framework.Input.Keys' is a 'type' but is used like a 'variable'
I can't stand using if/else statements when I have the ability to use a switch...so...any ideas? or is this even possible?