Esempio n. 1
0
 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);
         }
     }
 }
Esempio n. 2
0
 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);
         }
     }
 }
Esempio n. 3
0
 public void Start(IPongGame game)
 {
     game.Join(game.PlayerSlots[0]);
     game.Join(game.PlayerSlots[1]);
 }