mirror of
https://github.com/ppy/osu
synced 2025-01-05 13:50:03 +00:00
Make saveState private
This commit is contained in:
parent
7b57439976
commit
79b56cb35c
@ -52,7 +52,7 @@ namespace osu.Game.Screens.Play
|
||||
if (value && IsCounting)
|
||||
{
|
||||
CountPresses++;
|
||||
SaveState();
|
||||
saveState();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -142,12 +142,6 @@ namespace osu.Game.Screens.Play
|
||||
states.Clear();
|
||||
}
|
||||
|
||||
public void SaveState()
|
||||
{
|
||||
if (currentState == null || currentState.Time < Clock.CurrentTime)
|
||||
states.Add(currentState = new KeyCounterState(Clock.CurrentTime, CountPresses));
|
||||
}
|
||||
|
||||
protected override void Update()
|
||||
{
|
||||
base.Update();
|
||||
@ -156,6 +150,12 @@ namespace osu.Game.Screens.Play
|
||||
restoreStateTo(Clock.CurrentTime);
|
||||
}
|
||||
|
||||
private void saveState()
|
||||
{
|
||||
if (currentState == null || currentState.Time < Clock.CurrentTime)
|
||||
states.Add(currentState = new KeyCounterState(Clock.CurrentTime, CountPresses));
|
||||
}
|
||||
|
||||
private void restoreStateTo(double time)
|
||||
{
|
||||
states.RemoveAll(state => state.Time > time);
|
||||
|
Loading…
Reference in New Issue
Block a user