Added if to ignore more (for our purposes) useless keydowns

This commit is contained in:
FreezyLemon 2017-11-29 06:51:00 +01:00
parent c00fb47236
commit e3232dd754

View File

@ -105,6 +105,8 @@ namespace osu.Game.Rulesets.Taiko.UI
}
protected override bool OnKeyDown(InputState state, KeyDownEventArgs args)
{
if (!args.Repeat)
{
var sampleBank = Beatmap.ControlPointInfo.SoundPointAt(WorkingBeatmap.Track.CurrentTime).SampleBank ?? "normal";
string sampleName = "";
@ -116,6 +118,8 @@ namespace osu.Game.Rulesets.Taiko.UI
sampleName = "hitclap";
audio.Sample.Get($"Gameplay/{sampleBank}-{sampleName}")?.Play();
}
return base.OnKeyDown(state, args);
}