mirror of
https://github.com/ppy/osu
synced 2025-02-13 16:47:38 +00:00
Move dispose to end of file
This commit is contained in:
parent
59b624d4ba
commit
5c2ea0b1a7
@ -86,12 +86,6 @@ namespace osu.Game.Screens.Play
|
|||||||
GameplayClock.IsPaused.BindTo(IsPaused);
|
GameplayClock.IsPaused.BindTo(IsPaused);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void Dispose(bool isDisposing)
|
|
||||||
{
|
|
||||||
base.Dispose(isDisposing);
|
|
||||||
(sourceClock as IAdjustableAudioComponent)?.RemoveAdjustment(AdjustableProperty.Frequency, pauseFreqAdjust);
|
|
||||||
}
|
|
||||||
|
|
||||||
private double totalOffset => userOffsetClock.Offset + platformOffsetClock.Offset;
|
private double totalOffset => userOffsetClock.Offset + platformOffsetClock.Offset;
|
||||||
|
|
||||||
private readonly BindableDouble pauseFreqAdjust = new BindableDouble(1);
|
private readonly BindableDouble pauseFreqAdjust = new BindableDouble(1);
|
||||||
@ -154,7 +148,7 @@ namespace osu.Game.Screens.Play
|
|||||||
|
|
||||||
public void Stop()
|
public void Stop()
|
||||||
{
|
{
|
||||||
this.TransformBindableTo(pauseFreqAdjust, 0, 200, Easing.Out).OnComplete(_ => { adjustableClock.Stop(); });
|
this.TransformBindableTo(pauseFreqAdjust, 0, 200, Easing.Out).OnComplete(_ => adjustableClock.Stop());
|
||||||
|
|
||||||
IsPaused.Value = true;
|
IsPaused.Value = true;
|
||||||
}
|
}
|
||||||
@ -187,5 +181,11 @@ namespace osu.Game.Screens.Play
|
|||||||
foreach (var mod in mods.OfType<IApplicableToClock>())
|
foreach (var mod in mods.OfType<IApplicableToClock>())
|
||||||
mod.ApplyToClock(sourceClock);
|
mod.ApplyToClock(sourceClock);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override void Dispose(bool isDisposing)
|
||||||
|
{
|
||||||
|
base.Dispose(isDisposing);
|
||||||
|
(sourceClock as IAdjustableAudioComponent)?.RemoveAdjustment(AdjustableProperty.Frequency, pauseFreqAdjust);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user