Cache mods as array in DrawableRuleset

This commit is contained in:
smoogipoo
2019-04-10 17:11:17 +09:00
parent 85d3ff4846
commit 7845d542e3
2 changed files with 7 additions and 8 deletions

View File

@ -61,7 +61,7 @@ namespace osu.Game.Rulesets.UI
private IBindable<WorkingBeatmap> beatmap { get; set; }
[Resolved]
private IBindable<IEnumerable<Mod>> mods { get; set; }
private IReadOnlyList<Mod> mods { get; set; }
[BackgroundDependencyLoader]
private void load()
@ -125,7 +125,7 @@ namespace osu.Game.Rulesets.UI
base.Update();
if (beatmap != null)
foreach (var mod in mods.Value)
foreach (var mod in mods)
if (mod is IUpdatableByPlayfield updatable)
updatable.Update(this);
}