mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 06:03:08 +08:00
Simplify
This commit is contained in:
parent
4af119a407
commit
9287fae5f7
@ -19,19 +19,18 @@ namespace osu.Game.Tests.Visual.OnlinePlay
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public readonly Room Room = new Room();
|
public readonly Room Room = new Room();
|
||||||
|
|
||||||
[Cached]
|
|
||||||
private readonly Bindable<Room> roomBindable;
|
|
||||||
|
|
||||||
public TestRoomContainer()
|
public TestRoomContainer()
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both;
|
RelativeSizeAxes = Axes.Both;
|
||||||
roomBindable = new Bindable<Room>(Room);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent)
|
protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent)
|
||||||
{
|
{
|
||||||
var dependencies = new CachedModelDependencyContainer<Room>(base.CreateChildDependencies(parent));
|
var dependencies = new DependencyContainer(
|
||||||
dependencies.Model.Value = Room;
|
new CachedModelDependencyContainer<Room>(parent) { Model = { Value = Room } });
|
||||||
|
|
||||||
|
dependencies.Cache(new Bindable<Room>(Room));
|
||||||
|
|
||||||
return dependencies;
|
return dependencies;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user