Use new population methods and implement osu! ruleset actions

This commit is contained in:
Dean Herbert
2017-08-10 18:28:43 +09:00
parent b6bb07c0b5
commit e9a11ebc9f
6 changed files with 66 additions and 49 deletions

View File

@ -49,9 +49,19 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
disc.Texture = textures.Get(@"Play/osu/disc");
}
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args)
protected override bool OnKeyDown(InputState state, KeyDownEventArgs args)
{
return Hit?.Invoke() ?? false;
if (state.Data is OsuAction)
{
switch ((OsuAction)state.Data)
{
case OsuAction.LeftButton:
case OsuAction.RightButton:
return IsHovered && (Hit?.Invoke() ?? false);
}
}
return false;
}
}
}