Remove mods from workingbeatmap

This commit is contained in:
smoogipoo
2019-04-08 18:32:05 +09:00
parent ca9f172a96
commit c584967eb1
43 changed files with 147 additions and 116 deletions

View File

@ -57,13 +57,15 @@ namespace osu.Game.Rulesets.UI
hitObjectContainerLazy = new Lazy<HitObjectContainer>(CreateHitObjectContainer);
}
private WorkingBeatmap beatmap;
[Resolved]
private IBindable<WorkingBeatmap> beatmap { get; set; }
[Resolved]
private IBindable<IEnumerable<Mod>> selectedMods { get; set; }
[BackgroundDependencyLoader]
private void load(IBindable<WorkingBeatmap> beatmap)
private void load()
{
this.beatmap = beatmap.Value;
Cursor = CreateCursor();
if (Cursor != null)
AddInternal(Cursor);
@ -123,7 +125,7 @@ namespace osu.Game.Rulesets.UI
base.Update();
if (beatmap != null)
foreach (var mod in beatmap.Mods.Value)
foreach (var mod in selectedMods.Value)
if (mod is IUpdatableByPlayfield updatable)
updatable.Update(this);
}