mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 21:52:55 +08:00
Rename MatchStarted() -> GameplayStarted()
This commit is contained in:
parent
8c3b541312
commit
08d250fe58
@ -35,7 +35,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
||||
});
|
||||
|
||||
AddUntilStep("wait for player to be current", () => player.IsCurrentScreen() && player.IsLoaded);
|
||||
AddStep("start gameplay", () => ((IMultiplayerClient)MultiplayerClient).MatchStarted());
|
||||
AddStep("start gameplay", () => ((IMultiplayerClient)MultiplayerClient).GameplayStarted());
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
@ -98,9 +98,10 @@ namespace osu.Game.Online.Multiplayer
|
||||
Task LoadRequested();
|
||||
|
||||
/// <summary>
|
||||
/// Signals that a match has started. All users in the <see cref="MultiplayerUserState.Loaded"/> state should begin gameplay as soon as possible.
|
||||
/// Signals that gameplay has started.
|
||||
/// All users in the <see cref="MultiplayerUserState.Loaded"/> or <see cref="MultiplayerUserState.ReadyForGameplay"/> states should begin gameplay as soon as possible.
|
||||
/// </summary>
|
||||
Task MatchStarted();
|
||||
Task GameplayStarted();
|
||||
|
||||
/// <summary>
|
||||
/// Signals that the match has ended, all players have finished and results are ready to be displayed.
|
||||
|
@ -72,7 +72,7 @@ namespace osu.Game.Online.Multiplayer
|
||||
/// <summary>
|
||||
/// Invoked when the multiplayer server requests gameplay to be started.
|
||||
/// </summary>
|
||||
public event Action? MatchStarted;
|
||||
public event Action? GameplayStarted;
|
||||
|
||||
/// <summary>
|
||||
/// Invoked when the multiplayer server has finished collating results.
|
||||
@ -604,14 +604,14 @@ namespace osu.Game.Online.Multiplayer
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
Task IMultiplayerClient.MatchStarted()
|
||||
Task IMultiplayerClient.GameplayStarted()
|
||||
{
|
||||
Scheduler.Add(() =>
|
||||
{
|
||||
if (Room == null)
|
||||
return;
|
||||
|
||||
MatchStarted?.Invoke();
|
||||
GameplayStarted?.Invoke();
|
||||
}, false);
|
||||
|
||||
return Task.CompletedTask;
|
||||
|
@ -54,7 +54,7 @@ namespace osu.Game.Online.Multiplayer
|
||||
connection.On<MultiplayerRoomSettings>(nameof(IMultiplayerClient.SettingsChanged), ((IMultiplayerClient)this).SettingsChanged);
|
||||
connection.On<int, MultiplayerUserState>(nameof(IMultiplayerClient.UserStateChanged), ((IMultiplayerClient)this).UserStateChanged);
|
||||
connection.On(nameof(IMultiplayerClient.LoadRequested), ((IMultiplayerClient)this).LoadRequested);
|
||||
connection.On(nameof(IMultiplayerClient.MatchStarted), ((IMultiplayerClient)this).MatchStarted);
|
||||
connection.On(nameof(IMultiplayerClient.GameplayStarted), ((IMultiplayerClient)this).GameplayStarted);
|
||||
connection.On(nameof(IMultiplayerClient.ResultsReady), ((IMultiplayerClient)this).ResultsReady);
|
||||
connection.On<int, IEnumerable<APIMod>>(nameof(IMultiplayerClient.UserModsChanged), ((IMultiplayerClient)this).UserModsChanged);
|
||||
connection.On<int, BeatmapAvailability>(nameof(IMultiplayerClient.UserBeatmapAvailabilityChanged), ((IMultiplayerClient)this).UserBeatmapAvailabilityChanged);
|
||||
|
@ -115,7 +115,7 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer
|
||||
if (!ValidForResume)
|
||||
return; // token retrieval may have failed.
|
||||
|
||||
client.MatchStarted += onMatchStarted;
|
||||
client.GameplayStarted += onGameplayStarted;
|
||||
client.ResultsReady += onResultsReady;
|
||||
|
||||
ScoreProcessor.HasCompleted.BindValueChanged(completed =>
|
||||
@ -175,7 +175,7 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer
|
||||
leaderboardFlow.Position = new Vector2(padding, padding + HUDOverlay.TopScoringElementsHeight);
|
||||
}
|
||||
|
||||
private void onMatchStarted() => Scheduler.Add(() =>
|
||||
private void onGameplayStarted() => Scheduler.Add(() =>
|
||||
{
|
||||
if (!this.IsCurrentScreen())
|
||||
return;
|
||||
@ -223,7 +223,7 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer
|
||||
|
||||
if (client != null)
|
||||
{
|
||||
client.MatchStarted -= onMatchStarted;
|
||||
client.GameplayStarted -= onGameplayStarted;
|
||||
client.ResultsReady -= onResultsReady;
|
||||
}
|
||||
}
|
||||
|
@ -155,7 +155,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
||||
foreach (var u in Room.Users.Where(u => u.State == MultiplayerUserState.Loaded))
|
||||
ChangeUserState(u.UserID, MultiplayerUserState.Playing);
|
||||
|
||||
((IMultiplayerClient)this).MatchStarted();
|
||||
((IMultiplayerClient)this).GameplayStarted();
|
||||
|
||||
ChangeRoomState(MultiplayerRoomState.Playing);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user