remove bindable

This commit is contained in:
David Zhao 2019-07-08 16:32:11 +09:00
parent 6a86f62d17
commit ef22ab9340

View File

@ -11,21 +11,20 @@ namespace osu.Game.Screens.Play
{ {
public class ReplayPlayerLoader : PlayerLoader public class ReplayPlayerLoader : PlayerLoader
{ {
private readonly Bindable<IReadOnlyList<Mod>> mods; private readonly IReadOnlyList<Mod> mods;
public ReplayPlayerLoader(Score score) public ReplayPlayerLoader(Score score)
: base(() => new ReplayPlayer(score)) : base(() => new ReplayPlayer(score))
{ {
mods = new Bindable<IReadOnlyList<Mod>>(score.ScoreInfo.Mods); mods = score.ScoreInfo.Mods;
} }
protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent) protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent)
{ {
var dependencies = new DependencyContainer(base.CreateChildDependencies(parent)); var dependencies = new DependencyContainer(base.CreateChildDependencies(parent));
dependencies.Cache(mods);
// Overwrite the global mods here for use in the mod hud. // Overwrite the global mods here for use in the mod hud.
Mods.Value = mods.Value; Mods.Value = mods;
return dependencies; return dependencies;
} }