/// <summary> /// Creates a default configuration we thought up at the beginning of development. /// </summary> /// <returns></returns> public static KeyboardControllerConfiguration DefaultKeyConfig() { KeyboardControllerConfiguration def = new KeyboardControllerConfiguration(); def.Confirm = Keys.Enter; def.Cancel = Keys.Back; def.UseLeftItem = Keys.A; def.UseRightItem = Keys.S; def.SwitchItem1 = Keys.W; def.SwitchItem2 = Keys.Q; def.UpDirection = Keys.Up; def.DownDirection = Keys.Down; def.LeftDirection = Keys.Left; def.RightDirection = Keys.Right; def.BackButton = Keys.Back; def.PauseButton = Keys.Escape; return(def); }
/// <summary> /// Initalizes input device variables. /// </summary> public static void Initalize() { if (xInputControllers == null) { xInputControllers = new GamePadState[4]; } if (keyConfig == null) { keyConfig = KeyboardControllerConfiguration.DefaultKeyConfig(); } if (bindings == null) { bindings = new PlayerPad[4]; for (int i = 0; i < 4; i++) { bindings[i] = PlayerPad.NoPad; } } }