1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-26 21:03:21 +08:00

Invert if to reduce nesting

This commit is contained in:
Bartłomiej Dach 2020-06-19 20:15:14 +02:00
parent 53861cdde8
commit 470d5bfce3

View File

@ -35,14 +35,13 @@ namespace osu.Game.Storyboards.Drawables
private void load(IBindable<WorkingBeatmap> beatmap, IBindable<IReadOnlyList<Mod>> mods)
{
Channel = beatmap.Value.Skin.GetSample(sampleInfo);
if (Channel == null)
return;
if (Channel != null)
{
Channel.Volume.Value = sampleInfo.Volume / 100.0;
Channel.Volume.Value = sampleInfo.Volume / 100.0;
foreach (var mod in mods.Value.OfType<IApplicableToSample>())
mod.ApplyToSample(Channel);
}
foreach (var mod in mods.Value.OfType<IApplicableToSample>())
mod.ApplyToSample(Channel);
}
protected override void Update()