mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 16:52:54 +08:00
Call break time update when loaded
This commit is contained in:
parent
f29938e15d
commit
c9db0bf886
@ -32,6 +32,7 @@ namespace osu.Game.Screens.Play
|
|||||||
breaks = new PeriodTracker(value.Where(b => b.HasEffect)
|
breaks = new PeriodTracker(value.Where(b => b.HasEffect)
|
||||||
.Select(b => new Period(b.StartTime, b.EndTime - BreakOverlay.BREAK_FADE_DURATION)));
|
.Select(b => new Period(b.StartTime, b.EndTime - BreakOverlay.BREAK_FADE_DURATION)));
|
||||||
|
|
||||||
|
if (IsLoaded)
|
||||||
updateBreakTime();
|
updateBreakTime();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -50,7 +51,7 @@ namespace osu.Game.Screens.Play
|
|||||||
|
|
||||||
private void updateBreakTime()
|
private void updateBreakTime()
|
||||||
{
|
{
|
||||||
var time = Clock?.CurrentTime ?? 0;
|
var time = Clock.CurrentTime;
|
||||||
|
|
||||||
isBreakTime.Value = breaks?.IsInAny(time) == true
|
isBreakTime.Value = breaks?.IsInAny(time) == true
|
||||||
|| time < gameplayStartTime
|
|| time < gameplayStartTime
|
||||||
|
Loading…
Reference in New Issue
Block a user