Use GetAsync for all samples

This commit is contained in:
smoogipoo
2018-08-27 17:30:16 +09:00
parent 1b279d383f
commit e7a5816d27
19 changed files with 58 additions and 44 deletions

View File

@ -2,6 +2,7 @@
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System;
using System.Threading.Tasks;
using osu.Framework;
using osu.Framework.Allocation;
using osu.Framework.Audio;
@ -179,11 +180,11 @@ namespace osu.Game.Screens.Menu
}
[BackgroundDependencyLoader]
private void load(AudioManager audio)
private async Task load(AudioManager audio)
{
sampleHover = audio.Sample.Get(@"Menu/button-hover");
sampleHover = await audio.Sample.GetAsync(@"Menu/button-hover");
if (!string.IsNullOrEmpty(sampleName))
sampleClick = audio.Sample.Get($@"Menu/{sampleName}");
sampleClick = await audio.Sample.GetAsync($@"Menu/{sampleName}");
}
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args)