mirror of
https://github.com/osukey/osukey.git
synced 2025-05-31 10:27:26 +09:00
Merge pull request #17301 from smoogipoo/multiplayer-button-refactor
Integrate multiplayer button implementations into the buttons themselves
This commit is contained in:
commit
177a08eb09
@ -1,9 +1,7 @@
|
|||||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
// 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.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Audio;
|
using osu.Framework.Audio;
|
||||||
@ -35,8 +33,6 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
private BeatmapManager beatmaps;
|
private BeatmapManager beatmaps;
|
||||||
private RulesetStore rulesets;
|
private RulesetStore rulesets;
|
||||||
|
|
||||||
private IDisposable readyClickOperation;
|
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(GameHost host, AudioManager audio)
|
private void load(GameHost host, AudioManager audio)
|
||||||
{
|
{
|
||||||
@ -67,23 +63,6 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
Size = new Vector2(200, 50),
|
Size = new Vector2(200, 50),
|
||||||
OnReadyClick = () =>
|
|
||||||
{
|
|
||||||
readyClickOperation = OngoingOperationTracker.BeginOperation();
|
|
||||||
|
|
||||||
Task.Run(async () =>
|
|
||||||
{
|
|
||||||
if (MultiplayerClient.IsHost && MultiplayerClient.LocalUser?.State == MultiplayerUserState.Ready)
|
|
||||||
{
|
|
||||||
await MultiplayerClient.StartMatch();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
await MultiplayerClient.ToggleReady();
|
|
||||||
|
|
||||||
readyClickOperation.Dispose();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -208,9 +187,6 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
ClickButtonWhenEnabled<MultiplayerReadyButton>();
|
ClickButtonWhenEnabled<MultiplayerReadyButton>();
|
||||||
AddUntilStep("user waiting for load", () => MultiplayerClient.Room?.Users[0].State == MultiplayerUserState.WaitingForLoad);
|
AddUntilStep("user waiting for load", () => MultiplayerClient.Room?.Users[0].State == MultiplayerUserState.WaitingForLoad);
|
||||||
|
|
||||||
AddAssert("ready button disabled", () => !button.ChildrenOfType<OsuButton>().Single().Enabled.Value);
|
|
||||||
AddStep("transitioned to gameplay", () => readyClickOperation.Dispose());
|
|
||||||
|
|
||||||
AddStep("finish gameplay", () =>
|
AddStep("finish gameplay", () =>
|
||||||
{
|
{
|
||||||
MultiplayerClient.ChangeUserState(MultiplayerClient.Room?.Users[0].UserID ?? 0, MultiplayerUserState.Loaded);
|
MultiplayerClient.ChangeUserState(MultiplayerClient.Room?.Users[0].UserID ?? 0, MultiplayerUserState.Loaded);
|
||||||
|
@ -1,9 +1,7 @@
|
|||||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
// 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.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Audio;
|
using osu.Framework.Audio;
|
||||||
@ -36,8 +34,6 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
private BeatmapManager beatmaps;
|
private BeatmapManager beatmaps;
|
||||||
private RulesetStore rulesets;
|
private RulesetStore rulesets;
|
||||||
|
|
||||||
private IDisposable readyClickOperation;
|
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(GameHost host, AudioManager audio)
|
private void load(GameHost host, AudioManager audio)
|
||||||
{
|
{
|
||||||
@ -71,39 +67,12 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
Size = new Vector2(200, 50),
|
Size = new Vector2(200, 50),
|
||||||
OnSpectateClick = () =>
|
|
||||||
{
|
|
||||||
readyClickOperation = OngoingOperationTracker.BeginOperation();
|
|
||||||
|
|
||||||
Task.Run(async () =>
|
|
||||||
{
|
|
||||||
await MultiplayerClient.ToggleSpectate();
|
|
||||||
readyClickOperation.Dispose();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
readyButton = new MultiplayerReadyButton
|
readyButton = new MultiplayerReadyButton
|
||||||
{
|
{
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
Size = new Vector2(200, 50),
|
Size = new Vector2(200, 50),
|
||||||
OnReadyClick = () =>
|
|
||||||
{
|
|
||||||
readyClickOperation = OngoingOperationTracker.BeginOperation();
|
|
||||||
|
|
||||||
Task.Run(async () =>
|
|
||||||
{
|
|
||||||
if (MultiplayerClient.IsHost && MultiplayerClient.LocalUser?.State == MultiplayerUserState.Ready)
|
|
||||||
{
|
|
||||||
await MultiplayerClient.StartMatch();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
await MultiplayerClient.ToggleReady();
|
|
||||||
|
|
||||||
readyClickOperation.Dispose();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
// 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.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
using System;
|
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
|
|
||||||
@ -12,19 +11,6 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Match
|
|||||||
private const float ready_button_width = 600;
|
private const float ready_button_width = 600;
|
||||||
private const float spectate_button_width = 200;
|
private const float spectate_button_width = 200;
|
||||||
|
|
||||||
public Action OnReadyClick
|
|
||||||
{
|
|
||||||
set => readyButton.OnReadyClick = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Action OnSpectateClick
|
|
||||||
{
|
|
||||||
set => spectateButton.OnSpectateClick = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
private readonly MultiplayerReadyButton readyButton;
|
|
||||||
private readonly MultiplayerSpectateButton spectateButton;
|
|
||||||
|
|
||||||
public MultiplayerMatchFooter()
|
public MultiplayerMatchFooter()
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both;
|
RelativeSizeAxes = Axes.Both;
|
||||||
@ -37,12 +23,12 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Match
|
|||||||
new Drawable[]
|
new Drawable[]
|
||||||
{
|
{
|
||||||
null,
|
null,
|
||||||
spectateButton = new MultiplayerSpectateButton
|
new MultiplayerSpectateButton
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
},
|
},
|
||||||
null,
|
null,
|
||||||
readyButton = new MultiplayerReadyButton
|
new MultiplayerReadyButton
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
},
|
},
|
||||||
|
@ -2,7 +2,9 @@
|
|||||||
// See the LICENCE file in the repository root for full licence text.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
using System.Diagnostics;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using JetBrains.Annotations;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Audio;
|
using osu.Framework.Audio;
|
||||||
using osu.Framework.Audio.Sample;
|
using osu.Framework.Audio.Sample;
|
||||||
@ -19,28 +21,23 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Match
|
|||||||
{
|
{
|
||||||
public class MultiplayerReadyButton : MultiplayerRoomComposite
|
public class MultiplayerReadyButton : MultiplayerRoomComposite
|
||||||
{
|
{
|
||||||
public Action OnReadyClick
|
|
||||||
{
|
|
||||||
set => button.Action = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
[Resolved]
|
[Resolved]
|
||||||
private OsuColour colours { get; set; }
|
private OsuColour colours { get; set; }
|
||||||
|
|
||||||
[Resolved]
|
[Resolved]
|
||||||
private OngoingOperationTracker ongoingOperationTracker { get; set; }
|
private OngoingOperationTracker ongoingOperationTracker { get; set; }
|
||||||
|
|
||||||
private IBindable<bool> operationInProgress;
|
[CanBeNull]
|
||||||
|
private IDisposable clickOperation;
|
||||||
|
|
||||||
private Sample sampleReady;
|
private Sample sampleReady;
|
||||||
private Sample sampleReadyAll;
|
private Sample sampleReadyAll;
|
||||||
private Sample sampleUnready;
|
private Sample sampleUnready;
|
||||||
|
|
||||||
private readonly ButtonWithTrianglesExposed button;
|
private readonly ButtonWithTrianglesExposed button;
|
||||||
|
|
||||||
private int countReady;
|
private int countReady;
|
||||||
|
|
||||||
private ScheduledDelegate readySampleDelegate;
|
private ScheduledDelegate readySampleDelegate;
|
||||||
|
private IBindable<bool> operationInProgress;
|
||||||
|
|
||||||
public MultiplayerReadyButton()
|
public MultiplayerReadyButton()
|
||||||
{
|
{
|
||||||
@ -48,6 +45,7 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Match
|
|||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Size = Vector2.One,
|
Size = Vector2.One,
|
||||||
|
Action = onReadyClick,
|
||||||
Enabled = { Value = true },
|
Enabled = { Value = true },
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@ -73,10 +71,56 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Match
|
|||||||
protected override void OnRoomUpdated()
|
protected override void OnRoomUpdated()
|
||||||
{
|
{
|
||||||
base.OnRoomUpdated();
|
base.OnRoomUpdated();
|
||||||
|
|
||||||
updateState();
|
updateState();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override void OnRoomLoadRequested()
|
||||||
|
{
|
||||||
|
base.OnRoomLoadRequested();
|
||||||
|
endOperation();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void onReadyClick()
|
||||||
|
{
|
||||||
|
if (Room == null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
Debug.Assert(clickOperation == null);
|
||||||
|
clickOperation = ongoingOperationTracker.BeginOperation();
|
||||||
|
|
||||||
|
// Ensure the current user becomes ready before being able to do anything else (start match, stop countdown, unready).
|
||||||
|
if (!isReady() || !Client.IsHost)
|
||||||
|
{
|
||||||
|
toggleReady();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// And if a countdown isn't running, start the match.
|
||||||
|
startMatch();
|
||||||
|
|
||||||
|
bool isReady() => Client.LocalUser?.State == MultiplayerUserState.Ready || Client.LocalUser?.State == MultiplayerUserState.Spectating;
|
||||||
|
|
||||||
|
void toggleReady() => Client.ToggleReady().ContinueWith(_ => endOperation());
|
||||||
|
|
||||||
|
void startMatch() => Client.StartMatch().ContinueWith(t =>
|
||||||
|
{
|
||||||
|
// accessing Exception here silences any potential errors from the antecedent task
|
||||||
|
if (t.Exception != null)
|
||||||
|
{
|
||||||
|
// gameplay was not started due to an exception; unblock button.
|
||||||
|
endOperation();
|
||||||
|
}
|
||||||
|
|
||||||
|
// gameplay is starting, the button will be unblocked on load requested.
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private void endOperation()
|
||||||
|
{
|
||||||
|
clickOperation?.Dispose();
|
||||||
|
clickOperation = null;
|
||||||
|
}
|
||||||
|
|
||||||
private void updateState()
|
private void updateState()
|
||||||
{
|
{
|
||||||
var localUser = Client.LocalUser;
|
var localUser = Client.LocalUser;
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
// 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.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
using System;
|
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Bindables;
|
using osu.Framework.Bindables;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
@ -15,11 +14,6 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Match
|
|||||||
{
|
{
|
||||||
public class MultiplayerSpectateButton : MultiplayerRoomComposite
|
public class MultiplayerSpectateButton : MultiplayerRoomComposite
|
||||||
{
|
{
|
||||||
public Action OnSpectateClick
|
|
||||||
{
|
|
||||||
set => button.Action = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
[Resolved]
|
[Resolved]
|
||||||
private OngoingOperationTracker ongoingOperationTracker { get; set; }
|
private OngoingOperationTracker ongoingOperationTracker { get; set; }
|
||||||
|
|
||||||
@ -37,9 +31,19 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Match
|
|||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Size = Vector2.One,
|
Size = Vector2.One,
|
||||||
Enabled = { Value = true },
|
Enabled = { Value = true },
|
||||||
|
Action = onClick
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void onClick()
|
||||||
|
{
|
||||||
|
var clickOperation = ongoingOperationTracker.BeginOperation();
|
||||||
|
|
||||||
|
Client.ToggleSpectate().ContinueWith(t => endOperation());
|
||||||
|
|
||||||
|
void endOperation() => clickOperation?.Dispose();
|
||||||
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load()
|
private void load()
|
||||||
{
|
{
|
||||||
|
@ -1,11 +1,9 @@
|
|||||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
// 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.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using JetBrains.Annotations;
|
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Bindables;
|
using osu.Framework.Bindables;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
@ -46,14 +44,8 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer
|
|||||||
[Resolved]
|
[Resolved]
|
||||||
private MultiplayerClient client { get; set; }
|
private MultiplayerClient client { get; set; }
|
||||||
|
|
||||||
[Resolved]
|
|
||||||
private OngoingOperationTracker ongoingOperationTracker { get; set; }
|
|
||||||
|
|
||||||
private readonly IBindable<bool> isConnected = new Bindable<bool>();
|
private readonly IBindable<bool> isConnected = new Bindable<bool>();
|
||||||
|
|
||||||
[CanBeNull]
|
|
||||||
private IDisposable readyClickOperation;
|
|
||||||
|
|
||||||
private AddItemButton addItemButton;
|
private AddItemButton addItemButton;
|
||||||
|
|
||||||
public MultiplayerMatchSubScreen(Room room)
|
public MultiplayerMatchSubScreen(Room room)
|
||||||
@ -230,11 +222,7 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer
|
|||||||
this.Push(new MultiplayerMatchSongSelect(Room, itemToEdit));
|
this.Push(new MultiplayerMatchSongSelect(Room, itemToEdit));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override Drawable CreateFooter() => new MultiplayerMatchFooter
|
protected override Drawable CreateFooter() => new MultiplayerMatchFooter();
|
||||||
{
|
|
||||||
OnReadyClick = onReadyClick,
|
|
||||||
OnSpectateClick = onSpectateClick
|
|
||||||
};
|
|
||||||
|
|
||||||
protected override RoomSettingsOverlay CreateRoomSettingsOverlay(Room room) => new MultiplayerMatchSettingsOverlay(room);
|
protected override RoomSettingsOverlay CreateRoomSettingsOverlay(Room room) => new MultiplayerMatchSettingsOverlay(room);
|
||||||
|
|
||||||
@ -332,52 +320,6 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void onReadyClick()
|
|
||||||
{
|
|
||||||
Debug.Assert(readyClickOperation == null);
|
|
||||||
readyClickOperation = ongoingOperationTracker.BeginOperation();
|
|
||||||
|
|
||||||
if (client.IsHost && (client.LocalUser?.State == MultiplayerUserState.Ready || client.LocalUser?.State == MultiplayerUserState.Spectating))
|
|
||||||
{
|
|
||||||
client.StartMatch()
|
|
||||||
.ContinueWith(t =>
|
|
||||||
{
|
|
||||||
// accessing Exception here silences any potential errors from the antecedent task
|
|
||||||
if (t.Exception != null)
|
|
||||||
{
|
|
||||||
// gameplay was not started due to an exception; unblock button.
|
|
||||||
endOperation();
|
|
||||||
}
|
|
||||||
|
|
||||||
// gameplay is starting, the button will be unblocked on load requested.
|
|
||||||
});
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
client.ToggleReady()
|
|
||||||
.ContinueWith(t => endOperation());
|
|
||||||
|
|
||||||
void endOperation()
|
|
||||||
{
|
|
||||||
readyClickOperation?.Dispose();
|
|
||||||
readyClickOperation = null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void onSpectateClick()
|
|
||||||
{
|
|
||||||
Debug.Assert(readyClickOperation == null);
|
|
||||||
readyClickOperation = ongoingOperationTracker.BeginOperation();
|
|
||||||
|
|
||||||
client.ToggleSpectate().ContinueWith(t => endOperation());
|
|
||||||
|
|
||||||
void endOperation()
|
|
||||||
{
|
|
||||||
readyClickOperation?.Dispose();
|
|
||||||
readyClickOperation = null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void onRoomUpdated()
|
private void onRoomUpdated()
|
||||||
{
|
{
|
||||||
// may happen if the client is kicked or otherwise removed from the room.
|
// may happen if the client is kicked or otherwise removed from the room.
|
||||||
@ -433,9 +375,6 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
StartPlay();
|
StartPlay();
|
||||||
|
|
||||||
readyClickOperation?.Dispose();
|
|
||||||
readyClickOperation = null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override Screen CreateGameplayScreen()
|
protected override Screen CreateGameplayScreen()
|
||||||
|
@ -21,6 +21,7 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer
|
|||||||
base.LoadComplete();
|
base.LoadComplete();
|
||||||
|
|
||||||
Client.RoomUpdated += invokeOnRoomUpdated;
|
Client.RoomUpdated += invokeOnRoomUpdated;
|
||||||
|
Client.LoadRequested += invokeOnRoomLoadRequested;
|
||||||
Client.UserLeft += invokeUserLeft;
|
Client.UserLeft += invokeUserLeft;
|
||||||
Client.UserKicked += invokeUserKicked;
|
Client.UserKicked += invokeUserKicked;
|
||||||
Client.UserJoined += invokeUserJoined;
|
Client.UserJoined += invokeUserJoined;
|
||||||
@ -38,6 +39,7 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer
|
|||||||
private void invokeItemAdded(MultiplayerPlaylistItem item) => Schedule(() => PlaylistItemAdded(item));
|
private void invokeItemAdded(MultiplayerPlaylistItem item) => Schedule(() => PlaylistItemAdded(item));
|
||||||
private void invokeItemRemoved(long item) => Schedule(() => PlaylistItemRemoved(item));
|
private void invokeItemRemoved(long item) => Schedule(() => PlaylistItemRemoved(item));
|
||||||
private void invokeItemChanged(MultiplayerPlaylistItem item) => Schedule(() => PlaylistItemChanged(item));
|
private void invokeItemChanged(MultiplayerPlaylistItem item) => Schedule(() => PlaylistItemChanged(item));
|
||||||
|
private void invokeOnRoomLoadRequested() => Scheduler.AddOnce(OnRoomLoadRequested);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Invoked when a user has joined the room.
|
/// Invoked when a user has joined the room.
|
||||||
@ -94,6 +96,13 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Invoked when the room requests the local user to load into gameplay.
|
||||||
|
/// </summary>
|
||||||
|
protected virtual void OnRoomLoadRequested()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
protected override void Dispose(bool isDisposing)
|
protected override void Dispose(bool isDisposing)
|
||||||
{
|
{
|
||||||
if (Client != null)
|
if (Client != null)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user