Use double instead of TimeSpan

This commit is contained in:
phosphene47
2019-11-27 23:06:07 +11:00
parent 037d927e45
commit d4afea0b5e
2 changed files with 6 additions and 13 deletions

View File

@ -1,7 +1,6 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System;
using System.Linq;
using osu.Framework.Allocation;
using osu.Framework.Audio;
@ -44,12 +43,10 @@ namespace osu.Game.Graphics.UserInterface
if (buttons.Contains(e.Button) && Contains(e.ScreenSpaceMousePosition))
{
var debounceMs = (int)DebounceTime.TotalMilliseconds;
if (debounceMs <= 0)
if (DebounceTime <= 0)
sampleClick?.Play();
else
playDelegate = Scheduler.AddDelayed(() => sampleClick?.Play(), debounceMs);
playDelegate = Scheduler.AddDelayed(() => sampleClick?.Play(), DebounceTime);
}
return base.OnClick(e);