1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 09:02:55 +08:00

Fix potential of toggle between load and LoadComplete

This commit is contained in:
Dean Herbert 2019-09-11 19:06:31 +09:00
parent 039b5ec958
commit be66c0e912

View File

@ -41,6 +41,12 @@ namespace osu.Game.Graphics.Containers
[BackgroundDependencyLoader(true)] [BackgroundDependencyLoader(true)]
private void load(AudioManager audio) private void load(AudioManager audio)
{
samplePopIn = audio.Samples.Get(@"UI/overlay-pop-in");
samplePopOut = audio.Samples.Get(@"UI/overlay-pop-out");
}
protected override void LoadComplete()
{ {
OverlayActivationMode.ValueChanged += mode => OverlayActivationMode.ValueChanged += mode =>
{ {
@ -51,8 +57,7 @@ namespace osu.Game.Graphics.Containers
if (game != null) if (game != null)
OverlayActivationMode.BindTo(game.OverlayActivationMode); OverlayActivationMode.BindTo(game.OverlayActivationMode);
samplePopIn = audio.Samples.Get(@"UI/overlay-pop-in"); base.LoadComplete();
samplePopOut = audio.Samples.Get(@"UI/overlay-pop-out");
} }
/// <summary> /// <summary>