예제 #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]);
 }