1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 10:33:30 +08:00
osu-lazer/osu.Game.Rulesets.Catch/CatchInputManager.cs

39 lines
1.2 KiB
C#
Raw Normal View History

// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System.Collections.Generic;
using System.ComponentModel;
2017-08-11 15:11:46 +08:00
using osu.Framework.Input.Bindings;
using osu.Game.Input.Bindings;
using OpenTK.Input;
namespace osu.Game.Rulesets.Catch
{
2017-08-11 15:11:46 +08:00
public class CatchInputManager : DatabasedKeyBindingInputManager<CatchAction>
{
2017-08-12 18:54:07 +08:00
public CatchInputManager(RulesetInfo ruleset) : base(ruleset, simultaneousMode: SimultaneousBindingMode.Unique)
{
}
2017-08-12 18:54:07 +08:00
protected override IEnumerable<KeyBinding> CreateDefaultMappings() => new[]
{
2017-08-12 18:54:07 +08:00
new KeyBinding( Key.Z, CatchAction.MoveLeft),
new KeyBinding( Key.Left, CatchAction.MoveLeft),
new KeyBinding( Key.X, CatchAction.MoveRight),
new KeyBinding( Key.Right, CatchAction.MoveRight),
new KeyBinding( Key.LShift, CatchAction.Dash),
new KeyBinding( Key.RShift, CatchAction.Dash),
};
}
public enum CatchAction
{
[Description("Move left")]
MoveLeft,
[Description("Move right")]
MoveRight,
[Description("Engage dash")]
Dash
}
}