Add multiplayer client to OsuGameBase

This commit is contained in:
smoogipoo 2020-12-21 00:21:41 +09:00
parent 15480c006b
commit 959959dbed
1 changed files with 4 additions and 0 deletions

View File

@ -30,6 +30,7 @@
using osu.Game.Input;
using osu.Game.Input.Bindings;
using osu.Game.IO;
using osu.Game.Online.RealtimeMultiplayer;
using osu.Game.Online.Spectator;
using osu.Game.Overlays;
using osu.Game.Resources;
@ -78,6 +79,7 @@ public class OsuGameBase : Framework.Game, ICanAcceptFiles
protected IAPIProvider API;
private SpectatorStreamingClient spectatorStreaming;
private StatefulMultiplayerClient multiplayerClient;
protected MenuCursorContainer MenuCursorContainer;
@ -211,6 +213,7 @@ private void load()
dependencies.CacheAs(API ??= new APIAccess(LocalConfig));
dependencies.CacheAs(spectatorStreaming = new SpectatorStreamingClient());
dependencies.CacheAs(multiplayerClient = new RealtimeMultiplayerClient());
var defaultBeatmap = new DummyWorkingBeatmap(Audio, Textures);
@ -277,6 +280,7 @@ List<ScoreInfo> getBeatmapScores(BeatmapSetInfo set)
if (API is APIAccess apiAccess)
AddInternal(apiAccess);
AddInternal(spectatorStreaming);
AddInternal(multiplayerClient);
AddInternal(RulesetConfigCache);