Exemplo n.º 1
0
        public MusicSettingsHud(GameState game)
        {
            this.game         = game;
            this.lightnessBar = new Scrollbar(new Vector3(-16, 2, 0), 0.6f, f => { },
                                              KeyboardKeyAction.FromKey(Key.Number1), KeyboardKeyAction.FromKey(Key.Number2));

            this.tensionBar = new Scrollbar(new Vector3(-16, 4.5f, 0), 0.8f, f => { },
                                            KeyboardKeyAction.FromKey(Key.Number3), KeyboardKeyAction.FromKey(Key.Number4));

            this.healthBar = new Scrollbar(new Vector3(-16, 7f, 0), 0.8f, f => { },
                                           KeyboardKeyAction.FromKey(Key.Number5), KeyboardKeyAction.FromKey(Key.Number6));

            this.Parameters = MusicParameters.Default;
        }
Exemplo n.º 2
0
 private static IAction keyboardOrGamepadAction(Key key, string gamepadControl)
 {
     return(KeyboardKeyAction.FromKey(key)
            .Or(GamePadAction.FromString("gamepad0:" + gamepadControl)));
 }
Exemplo n.º 3
0
 private static IAction keyboardOrGamepadAction(Key key, Key key2, string gamepadControl)
 {
     return(ControlScheme.keyboardOrGamepadAction(key, gamepadControl)
            .Or(KeyboardKeyAction.FromKey(key2)));
 }