1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-19 05:22:57 +08:00
osu-lazer/osu.Game/Tests/Visual/Multiplayer/MultiplayerTestSceneDependencies.cs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

37 lines
1.4 KiB
C#
Raw Normal View History

// 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.
2022-06-17 15:37:17 +08:00
#nullable disable
using osu.Game.Online.Multiplayer;
using osu.Game.Online.Spectator;
using osu.Game.Screens.OnlinePlay;
using osu.Game.Tests.Visual.OnlinePlay;
using osu.Game.Tests.Visual.Spectator;
namespace osu.Game.Tests.Visual.Multiplayer
{
2021-06-25 17:02:53 +08:00
/// <summary>
/// Contains the basic dependencies of multiplayer test scenes.
/// </summary>
2021-06-25 19:15:30 +08:00
public class MultiplayerTestSceneDependencies : OnlinePlayTestSceneDependencies, IMultiplayerTestSceneDependencies
{
public TestMultiplayerClient MultiplayerClient { get; }
public TestSpectatorClient SpectatorClient { get; }
2021-10-27 15:10:22 +08:00
public new TestMultiplayerRoomManager RoomManager => (TestMultiplayerRoomManager)base.RoomManager;
2021-06-25 19:11:38 +08:00
public MultiplayerTestSceneDependencies()
{
MultiplayerClient = new TestMultiplayerClient(RoomManager);
SpectatorClient = CreateSpectatorClient();
CacheAs<MultiplayerClient>(MultiplayerClient);
CacheAs<SpectatorClient>(SpectatorClient);
}
protected override IRoomManager CreateRoomManager() => new TestMultiplayerRoomManager(RequestsHandler);
protected virtual TestSpectatorClient CreateSpectatorClient() => new TestSpectatorClient();
}
}