Exemplo n.º 1
0
        public ControlScheme()
        {
            this.Up    = ControlScheme.keyboardOrGamepadAction(Key.Up, Key.W, "-y");
            this.Down  = ControlScheme.keyboardOrGamepadAction(Key.Down, Key.S, "+y");
            this.Left  = ControlScheme.keyboardOrGamepadAction(Key.Left, Key.A, "-x");
            this.Right = ControlScheme.keyboardOrGamepadAction(Key.Right, Key.D, "+x");

            this.Action = ControlScheme.keyboardOrGamepadAction(Key.Space, "a");
        }
Exemplo n.º 2
0
 private static IAction keyboardOrGamepadAction(Key key, Key key2, string gamepadControl)
 {
     return(ControlScheme.keyboardOrGamepadAction(key, gamepadControl)
            .Or(KeyboardKeyAction.FromKey(key2)));
 }