mirror of
https://github.com/ppy/osu
synced 2025-01-07 22:59:55 +00:00
Remove unnecessary index resets
This commit is contained in:
parent
4143bafd67
commit
1dd3a66300
@ -33,7 +33,8 @@ namespace osu.Game.Screens.Play
|
|||||||
breaks = value;
|
breaks = value;
|
||||||
|
|
||||||
// reset index in case the new breaks list is smaller than last one
|
// reset index in case the new breaks list is smaller than last one
|
||||||
resetBreakIndex();
|
isBreakTime.Value = false;
|
||||||
|
currentBreakIndex = 0;
|
||||||
|
|
||||||
initializeBreaks();
|
initializeBreaks();
|
||||||
}
|
}
|
||||||
@ -126,23 +127,13 @@ namespace osu.Game.Screens.Play
|
|||||||
protected override void Update()
|
protected override void Update()
|
||||||
{
|
{
|
||||||
base.Update();
|
base.Update();
|
||||||
|
|
||||||
updateBreakTimeBindable();
|
updateBreakTimeBindable();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void resetBreakIndex()
|
|
||||||
{
|
|
||||||
isBreakTime.Value = false;
|
|
||||||
currentBreakIndex = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void updateBreakTimeBindable()
|
private void updateBreakTimeBindable()
|
||||||
{
|
{
|
||||||
if (breaks?.Any() != true)
|
if (breaks?.Any() != true)
|
||||||
{
|
|
||||||
resetBreakIndex();
|
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
var time = Clock.CurrentTime;
|
var time = Clock.CurrentTime;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user