1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 19:27:26 +08:00

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
{
private readonly Bindable<IReadOnlyList<Mod>> mods;
private readonly IReadOnlyList<Mod> mods;
public ReplayPlayerLoader(Score score)
: base(() => new ReplayPlayer(score))
{
mods = new Bindable<IReadOnlyList<Mod>>(score.ScoreInfo.Mods);
mods = score.ScoreInfo.Mods;
}
protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent)
{
var dependencies = new DependencyContainer(base.CreateChildDependencies(parent));
dependencies.Cache(mods);
// Overwrite the global mods here for use in the mod hud.
Mods.Value = mods.Value;
Mods.Value = mods;
return dependencies;
}