mirror of
https://github.com/ppy/osu
synced 2025-01-22 05:43:14 +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)
|
if (value && IsCounting)
|
||||||
{
|
{
|
||||||
CountPresses++;
|
CountPresses++;
|
||||||
SaveState();
|
saveState();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -142,12 +142,6 @@ namespace osu.Game.Screens.Play
|
|||||||
states.Clear();
|
states.Clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SaveState()
|
|
||||||
{
|
|
||||||
if (currentState == null || currentState.Time < Clock.CurrentTime)
|
|
||||||
states.Add(currentState = new KeyCounterState(Clock.CurrentTime, CountPresses));
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void Update()
|
protected override void Update()
|
||||||
{
|
{
|
||||||
base.Update();
|
base.Update();
|
||||||
@ -156,6 +150,12 @@ namespace osu.Game.Screens.Play
|
|||||||
restoreStateTo(Clock.CurrentTime);
|
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)
|
private void restoreStateTo(double time)
|
||||||
{
|
{
|
||||||
states.RemoveAll(state => state.Time > time);
|
states.RemoveAll(state => state.Time > time);
|
||||||
|
Loading…
Reference in New Issue
Block a user