1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-29 19:47:24 +08:00
osu-lazer/osu.Game/Tests/Visual/MultiplayerTestCase.cs

31 lines
980 B
C#
Raw Normal View History

2019-02-05 18:00:01 +08:00
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Allocation;
2019-02-08 15:02:14 +08:00
using osu.Framework.Configuration;
2019-02-05 18:00:01 +08:00
using osu.Game.Online.Multiplayer;
namespace osu.Game.Tests.Visual
{
public class MultiplayerTestCase : OsuTestCase
{
2019-02-08 15:02:14 +08:00
[Cached]
private readonly Bindable<Room> currentRoom = new Bindable<Room>(new Room());
2019-02-05 18:00:01 +08:00
protected Room Room
{
2019-02-08 15:02:14 +08:00
get => currentRoom;
set => currentRoom.Value = value;
2019-02-05 18:00:01 +08:00
}
private CachedModelDependencyContainer<Room> dependencies;
protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent)
{
dependencies = new CachedModelDependencyContainer<Room>(base.CreateChildDependencies(parent));
2019-02-08 15:02:14 +08:00
dependencies.Model.BindTo(currentRoom);
2019-02-05 18:00:01 +08:00
return dependencies;
}
}
}