2017-08-09 10:50:34 +08:00
|
|
|
|
// 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;
|
2017-08-10 16:14:30 +08:00
|
|
|
|
using System.ComponentModel;
|
2017-08-09 10:50:34 +08:00
|
|
|
|
using osu.Game.Input;
|
|
|
|
|
using OpenTK.Input;
|
|
|
|
|
|
|
|
|
|
namespace osu.Game.Rulesets.Catch
|
|
|
|
|
{
|
|
|
|
|
public class CatchInputManager : ActionMappingInputManager<CatchAction>
|
|
|
|
|
{
|
2017-08-10 15:08:43 +08:00
|
|
|
|
public CatchInputManager(RulesetInfo ruleset) : base(ruleset, allowConcurrentActions: true)
|
2017-08-09 10:50:34 +08:00
|
|
|
|
{
|
|
|
|
|
}
|
2017-08-09 16:10:32 +08:00
|
|
|
|
|
2017-08-10 15:08:43 +08:00
|
|
|
|
protected override IDictionary<KeyCombination, CatchAction> CreateDefaultMappings() => new Dictionary<KeyCombination, CatchAction>
|
2017-08-09 16:10:32 +08:00
|
|
|
|
{
|
|
|
|
|
{ Key.Z, CatchAction.MoveLeft },
|
|
|
|
|
{ Key.Left, CatchAction.MoveLeft },
|
|
|
|
|
{ Key.X, CatchAction.MoveRight },
|
|
|
|
|
{ Key.Right, CatchAction.MoveRight },
|
|
|
|
|
{ Key.LShift, CatchAction.Dash },
|
|
|
|
|
{ Key.RShift, CatchAction.Dash },
|
|
|
|
|
};
|
2017-08-09 10:50:34 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public enum CatchAction
|
|
|
|
|
{
|
2017-08-10 16:14:30 +08:00
|
|
|
|
[Description("Move left")]
|
2017-08-09 10:50:34 +08:00
|
|
|
|
MoveLeft,
|
2017-08-10 16:14:30 +08:00
|
|
|
|
[Description("Move right")]
|
2017-08-09 10:50:34 +08:00
|
|
|
|
MoveRight,
|
2017-08-10 16:14:30 +08:00
|
|
|
|
[Description("Engage dash")]
|
2017-08-09 10:50:34 +08:00
|
|
|
|
Dash
|
|
|
|
|
}
|
|
|
|
|
}
|