示例#1
0
文件: PongInput.cs 项目: asifpow/Pong
 public void Apply(IPongGame game)
 {
     keyboardInput.Poll();
     if (keyboardInput.IsPressed(Key.Escape))
     {
         game.Exit();
     }
     foreach (var playerSlot in game.PlayerSlots)
     {
         if (keyboardInput.IsPressed(playerSlot.StartKey))
         {
             game.Join(playerSlot);
         }
     }
 }
示例#2
0
文件: PongInput.cs 项目: kibiz0r/Pong
 public void Apply(IPongGame game)
 {
     keyboardInput.Poll();
     if (keyboardInput.IsPressed(Key.Escape))
     {
         game.Exit();
     }
     foreach (var playerSlot in game.PlayerSlots)
     {
         if (keyboardInput.IsPressed(playerSlot.StartKey))
         {
             game.Join(playerSlot);
         }
     }
 }
示例#3
0
 public void Start(IPongGame game)
 {
     game.Join(game.PlayerSlots[0]);
     game.Join(game.PlayerSlots[1]);
 }