1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-13 14:12:56 +08:00
This commit is contained in:
smoogipoo 2021-06-24 16:54:09 +09:00
parent 4af119a407
commit 9287fae5f7

View File

@ -19,19 +19,18 @@ namespace osu.Game.Tests.Visual.OnlinePlay
/// </summary>
public readonly Room Room = new Room();
[Cached]
private readonly Bindable<Room> roomBindable;
public TestRoomContainer()
{
RelativeSizeAxes = Axes.Both;
roomBindable = new Bindable<Room>(Room);
}
protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent)
{
var dependencies = new CachedModelDependencyContainer<Room>(base.CreateChildDependencies(parent));
dependencies.Model.Value = Room;
var dependencies = new DependencyContainer(
new CachedModelDependencyContainer<Room>(parent) { Model = { Value = Room } });
dependencies.Cache(new Bindable<Room>(Room));
return dependencies;
}
}