Rename Restart() -> Reset()

This commit is contained in:
smoogipoo 2021-04-19 19:53:55 +09:00
parent 44e13a91ad
commit c7183f92f7
3 changed files with 5 additions and 5 deletions

View File

@ -82,9 +82,9 @@ namespace osu.Game.Screens.Play
public virtual void Stop() => IsPaused.Value = true; public virtual void Stop() => IsPaused.Value = true;
/// <summary> /// <summary>
/// Restarts gameplay. /// Resets this <see cref="GameplayClockContainer"/> and the source to an initial state ready for gameplay.
/// </summary> /// </summary>
public virtual void Restart() public virtual void Reset()
{ {
AdjustableSource.Seek(0); AdjustableSource.Seek(0);
AdjustableSource.Stop(); AdjustableSource.Stop();

View File

@ -123,10 +123,10 @@ namespace osu.Game.Screens.Play
userOffsetClock.ProcessFrame(); userOffsetClock.ProcessFrame();
} }
public override void Restart() public override void Reset()
{ {
updateRate(); updateRate();
base.Restart(); base.Reset();
} }
/// <summary> /// <summary>

View File

@ -811,7 +811,7 @@ namespace osu.Game.Screens.Play
if (GameplayClockContainer.GameplayClock.IsRunning) if (GameplayClockContainer.GameplayClock.IsRunning)
throw new InvalidOperationException($"{nameof(StartGameplay)} should not be called when the gameplay clock is already running"); throw new InvalidOperationException($"{nameof(StartGameplay)} should not be called when the gameplay clock is already running");
GameplayClockContainer.Restart(); GameplayClockContainer.Reset();
} }
public override void OnSuspending(IScreen next) public override void OnSuspending(IScreen next)