示例#1
0
文件: Game.cs 项目: mgorzelsky/Pong
 //Loop waiting for player input. On a seperate thread so it can be killed when the game over state is
 //reached and it doesn't hang up the game state progression at the ReadKey().
 private void WaitForInput()
 {
     while (noWinner)
     {
         ConsoleKey keyPressed = Console.ReadKey(true).Key;
         leftPaddle.PaddleMove(keyPressed);
         rightPaddle.PaddleMove(keyPressed);
     }
 }