mirror of
https://github.com/ppy/osu.git
synced 2025-01-13 17:13:06 +08:00
Simplify tick calculation/playback method
This commit is contained in:
parent
c8947daee3
commit
7d86dafd4f
@ -238,20 +238,6 @@ namespace osu.Game.Screens.Ranking.Expanded.Accuracy
|
||||
}
|
||||
}
|
||||
|
||||
protected override void Update()
|
||||
{
|
||||
base.Update();
|
||||
|
||||
if (!isTicking) return;
|
||||
|
||||
bool enoughTimePassedSinceLastPlayback = Clock.CurrentTime - lastTickPlaybackTime >= tickPlaybackRate.Value;
|
||||
|
||||
if (!enoughTimePassedSinceLastPlayback) return;
|
||||
|
||||
Schedule(() => scoreTickSound?.Play());
|
||||
lastTickPlaybackTime = Clock.CurrentTime;
|
||||
}
|
||||
|
||||
protected override void LoadComplete()
|
||||
{
|
||||
base.LoadComplete();
|
||||
@ -349,6 +335,17 @@ namespace osu.Game.Screens.Ranking.Expanded.Accuracy
|
||||
}
|
||||
}
|
||||
|
||||
protected override void Update()
|
||||
{
|
||||
base.Update();
|
||||
|
||||
if (isTicking && Clock.CurrentTime - lastTickPlaybackTime >= tickPlaybackRate.Value)
|
||||
{
|
||||
scoreTickSound?.Play();
|
||||
lastTickPlaybackTime = Clock.CurrentTime;
|
||||
}
|
||||
}
|
||||
|
||||
private string applauseSampleName
|
||||
{
|
||||
get
|
||||
|
Loading…
Reference in New Issue
Block a user