public static KeyboardInputProcessor CreateForPlayerTwo() { KeyboardInputProcessor processor = new KeyboardInputProcessor(); processor.DefineKey(KeyDefinitions.Up, Keys.Up); processor.DefineKey(KeyDefinitions.Down, Keys.Down); processor.DefineKey(KeyDefinitions.Left, Keys.Left); processor.DefineKey(KeyDefinitions.Right, Keys.Right); processor.DefineKey(KeyDefinitions.Action, Keys.Enter); processor.DefineKey(KeyDefinitions.Select, Keys.Enter); processor.DefineKey(KeyDefinitions.PowerUp, Keys.RightShift); return processor; }
public static KeyboardInputProcessor CreateForPlayerOne() { KeyboardInputProcessor processor = new KeyboardInputProcessor(); processor.DefineKey(KeyDefinitions.Up, Keys.W); processor.DefineKey(KeyDefinitions.Down, Keys.S); processor.DefineKey(KeyDefinitions.Left, Keys.A); processor.DefineKey(KeyDefinitions.Right, Keys.D); processor.DefineKey(KeyDefinitions.Action, Keys.Space); processor.DefineKey(KeyDefinitions.Select, Keys.Space); processor.DefineKey(KeyDefinitions.PowerUp, Keys.LeftShift); return processor; }
public static KeyboardInputProcessor CreateForPlayerTwo() { KeyboardInputProcessor processor = new KeyboardInputProcessor(); processor.DefineKey(KeyDefinitions.Up, Keys.Up); processor.DefineKey(KeyDefinitions.Down, Keys.Down); processor.DefineKey(KeyDefinitions.Left, Keys.Left); processor.DefineKey(KeyDefinitions.Right, Keys.Right); processor.DefineKey(KeyDefinitions.Action, Keys.Enter); processor.DefineKey(KeyDefinitions.Select, Keys.Enter); processor.DefineKey(KeyDefinitions.PowerUp, Keys.RightShift); return(processor); }
public static KeyboardInputProcessor CreateForPlayerOne() { KeyboardInputProcessor processor = new KeyboardInputProcessor(); processor.DefineKey(KeyDefinitions.Up, Keys.W); processor.DefineKey(KeyDefinitions.Down, Keys.S); processor.DefineKey(KeyDefinitions.Left, Keys.A); processor.DefineKey(KeyDefinitions.Right, Keys.D); processor.DefineKey(KeyDefinitions.Action, Keys.Space); processor.DefineKey(KeyDefinitions.Select, Keys.Space); processor.DefineKey(KeyDefinitions.PowerUp, Keys.LeftShift); return(processor); }
private InputProcessorBase CreatePlayerController(PlayerController method) { switch (method) { case PlayerController.KeyboardOne: return(KeyboardInputProcessor.CreateForPlayerOne()); break; case PlayerController.KeyboardTwo: return(KeyboardInputProcessor.CreateForPlayerTwo()); break; case PlayerController.GamepadOne: return(new GamePadInputProcessor(PlayerIndex.One)); break; case PlayerController.GamepadTwo: return(new GamePadInputProcessor(PlayerIndex.Two)); break; case PlayerController.GamepadThree: return(new GamePadInputProcessor(PlayerIndex.Three)); break; case PlayerController.GamepadFour: return(new GamePadInputProcessor(PlayerIndex.Four)); break; } return(null); }