2019-02-05 19:00:01 +09: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-21 19:04:31 +09:00
|
|
|
using osu.Framework.Bindables;
|
2019-02-05 19:00:01 +09:00
|
|
|
using osu.Game.Online.Multiplayer;
|
|
|
|
|
|
|
|
namespace osu.Game.Tests.Visual
|
|
|
|
{
|
2019-05-14 22:37:25 +03:00
|
|
|
public abstract class MultiplayerTestScene : ScreenTestScene
|
2019-02-05 19:00:01 +09:00
|
|
|
{
|
2019-02-08 16:02:14 +09:00
|
|
|
[Cached]
|
2020-07-09 18:55:10 +09:00
|
|
|
private readonly Bindable<Room> currentRoom = new Bindable<Room>();
|
2019-02-05 19:00:01 +09:00
|
|
|
|
|
|
|
protected Room Room
|
|
|
|
{
|
2019-02-21 18:56:34 +09:00
|
|
|
get => currentRoom.Value;
|
2019-02-08 16:02:14 +09:00
|
|
|
set => currentRoom.Value = value;
|
2019-02-05 19:00:01 +09:00
|
|
|
}
|
|
|
|
|
|
|
|
private CachedModelDependencyContainer<Room> dependencies;
|
|
|
|
|
|
|
|
protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent)
|
|
|
|
{
|
|
|
|
dependencies = new CachedModelDependencyContainer<Room>(base.CreateChildDependencies(parent));
|
2019-02-08 16:02:14 +09:00
|
|
|
dependencies.Model.BindTo(currentRoom);
|
2019-02-05 19:00:01 +09:00
|
|
|
return dependencies;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|