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
1 changed files with 7 additions and 2 deletions

View File

@ -41,6 +41,12 @@ public abstract class OsuFocusedOverlayContainer : FocusedOverlayContainer, IPre
[BackgroundDependencyLoader(true)]
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 =>
{
@ -51,8 +57,7 @@ private void load(AudioManager audio)
if (game != null)
OverlayActivationMode.BindTo(game.OverlayActivationMode);
samplePopIn = audio.Samples.Get(@"UI/overlay-pop-in");
samplePopOut = audio.Samples.Get(@"UI/overlay-pop-out");
base.LoadComplete();
}
/// <summary>