mirror of
https://github.com/ppy/osu
synced 2025-01-19 04:20:59 +00:00
better implementation
This commit is contained in:
parent
09f9f86b06
commit
aebe87fefc
@ -50,6 +50,7 @@ namespace osu.Game.Screens.Play
|
|||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(AudioManager audio, BeatmapDatabase beatmaps, OsuGameBase game)
|
private void load(AudioManager audio, BeatmapDatabase beatmaps, OsuGameBase game)
|
||||||
{
|
{
|
||||||
|
dimLevel = game.Config.GetBindable<int>(OsuConfig.DimLevel);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (Beatmap == null)
|
if (Beatmap == null)
|
||||||
@ -114,7 +115,6 @@ namespace osu.Game.Screens.Play
|
|||||||
},
|
},
|
||||||
scoreOverlay,
|
scoreOverlay,
|
||||||
};
|
};
|
||||||
dimLevel = game.Config.GetBindable<int>(OsuConfig.DimLevel);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void LoadComplete()
|
protected override void LoadComplete()
|
||||||
@ -158,8 +158,7 @@ namespace osu.Game.Screens.Play
|
|||||||
|
|
||||||
protected override bool OnExiting(GameMode next)
|
protected override bool OnExiting(GameMode next)
|
||||||
{
|
{
|
||||||
if(dimLevel != null)
|
dimLevel.ValueChanged -= dimChanged;
|
||||||
dimLevel.ValueChanged -= dimChanged;
|
|
||||||
Background?.FadeTo(1f, 200);
|
Background?.FadeTo(1f, 200);
|
||||||
return base.OnExiting(next);
|
return base.OnExiting(next);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user