Пример #1
0
 /// <summary>
 /// Assigns a gamepad part to a control for all players, with a different gamepad playerindex than player.
 /// </summary>
 /// <param name="player"></param>
 /// <param name="name"></param>
 /// <param name="padPlayer"></param>
 /// <param name="gen"></param>
 public void AssignControl(string name, PlayerIndex padPlayer, Pad.Generator gen)
 {
     AssignControl(PlayerIndex.One, name, padPlayer, gen);
     AssignControl(PlayerIndex.Two, name, padPlayer, gen);
     AssignControl(PlayerIndex.Three, name, padPlayer, gen);
     AssignControl(PlayerIndex.Four, name, padPlayer, gen);
 }
Пример #2
0
 /// <summary>
 /// Returns a delegate for an analog part of the GamePad with the given player index.
 /// </summary>
 /// <param name="player"></param>
 /// <param name="name"></param>
 /// <param name="gen"></param>
 public InputMethod ControlGen(PlayerIndex player, Pad.Generator gen)
 {
     return gen(player);
 }
Пример #3
0
 /// <summary>
 /// Assigns a gamepad part to a control, with a different gamepad playerindex than player.
 /// </summary>
 /// <param name="player"></param>
 /// <param name="name"></param>
 /// <param name="padPlayer"></param>
 /// <param name="gen"></param>
 public void AssignControl(PlayerIndex player, string name, PlayerIndex padPlayer, Pad.Generator gen)
 {
     PlayerControls[player][name] = gen(padPlayer);
 }