Original Post
Hi! all I have this code, and i don't know why the LeftArrow event is only repeated 1 time while the key is pressed. I need to press several times to move the piece several spaces. The movement isn't continuous .. :?
public override void HandleKeyboardEvents(SdlDotNet.KeyboardEventArgs e)
{
try
{
switch (e.Key)
{
case Key.DownArrow:
_map.CurrentPieceMoveDown();
break;
case Key.LeftArrow:
_map.CurrentPieceMoveLeft();
Console.WriteLine("LeftArrow Pressed");
break;
case Key.RightArrow:
_map.CurrentPieceMoveRight();
break;
case Key.UpArrow:
_map.CurrentPieceRotate();
break;
}
}
catch (SdlException)
{
}
}