1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-05 18:12:55 +08:00
osu-lazer/osu.Game.Rulesets.Catch/CatchInputManager.cs
Dean Herbert 30bd1d70b5 ActionMapping doesn't support concurrent actions by default
But can when required. Also supports key combination bindings now.
2017-08-10 16:08:43 +09:00

34 lines
1.0 KiB
C#

// 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 osu.Game.Input;
using OpenTK.Input;
namespace osu.Game.Rulesets.Catch
{
public class CatchInputManager : ActionMappingInputManager<CatchAction>
{
public CatchInputManager(RulesetInfo ruleset) : base(ruleset, allowConcurrentActions: true)
{
}
protected override IDictionary<KeyCombination, CatchAction> CreateDefaultMappings() => new Dictionary<KeyCombination, CatchAction>
{
{ Key.Z, CatchAction.MoveLeft },
{ Key.Left, CatchAction.MoveLeft },
{ Key.X, CatchAction.MoveRight },
{ Key.Right, CatchAction.MoveRight },
{ Key.LShift, CatchAction.Dash },
{ Key.RShift, CatchAction.Dash },
};
}
public enum CatchAction
{
MoveLeft,
MoveRight,
Dash
}
}