1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-13 15:33:21 +08:00

Rename classes

This commit is contained in:
smoogipoo 2021-04-22 23:39:02 +09:00
parent 8a0ba3a055
commit ee25949751
7 changed files with 19 additions and 19 deletions

View File

@ -37,7 +37,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
[Resolved]
private BeatmapManager beatmapManager { get; set; }
private MultiplayerSpectator spectator;
private MultiSpectatorScreen spectatorScreen;
private readonly List<int> playingUserIds = new List<int>();
private readonly Dictionary<int, int> nextFrame = new Dictionary<int, int>();
@ -91,11 +91,11 @@ namespace osu.Game.Tests.Visual.Multiplayer
AddWaitStep("wait a bit", 10);
AddStep("load player 55", () => streamingClient.StartPlay(55, importedBeatmapId));
AddUntilStep("one player added", () => spectator.ChildrenOfType<Player>().Count() == 1);
AddUntilStep("one player added", () => spectatorScreen.ChildrenOfType<Player>().Count() == 1);
AddWaitStep("wait a bit", 10);
AddStep("load player 56", () => streamingClient.StartPlay(56, importedBeatmapId));
AddUntilStep("two players added", () => spectator.ChildrenOfType<Player>().Count() == 2);
AddUntilStep("two players added", () => spectatorScreen.ChildrenOfType<Player>().Count() == 2);
}
[Test]
@ -239,10 +239,10 @@ namespace osu.Game.Tests.Visual.Multiplayer
Beatmap.Value = beatmapManager.GetWorkingBeatmap(importedBeatmap);
Ruleset.Value = importedBeatmap.Ruleset;
LoadScreen(spectator = new MultiplayerSpectator(playingUserIds.ToArray()));
LoadScreen(spectatorScreen = new MultiSpectatorScreen(playingUserIds.ToArray()));
});
AddUntilStep("wait for screen load", () => spectator.LoadState == LoadState.Loaded && (!waitForPlayerLoad || spectator.AllPlayersLoaded));
AddUntilStep("wait for screen load", () => spectatorScreen.LoadState == LoadState.Loaded && (!waitForPlayerLoad || spectatorScreen.AllPlayersLoaded));
}
private void start(int userId, int? beatmapId = null) => start(new[] { userId }, beatmapId);
@ -299,7 +299,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
private Player getPlayer(int userId) => getInstance(userId).ChildrenOfType<Player>().Single();
private PlayerInstance getInstance(int userId) => spectator.ChildrenOfType<PlayerInstance>().Single(p => p.UserId == userId);
private PlayerInstance getInstance(int userId) => spectatorScreen.ChildrenOfType<PlayerInstance>().Single(p => p.UserId == userId);
public class TestSpectatorStreamingClient : SpectatorStreamingClient
{

View File

@ -54,7 +54,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
[SetUpSteps]
public new void SetUpSteps()
{
MultiplayerSpectatorLeaderboard leaderboard = null;
MultiSpectatorLeaderboard leaderboard = null;
AddStep("reset", () =>
{
@ -78,7 +78,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
var scoreProcessor = new OsuScoreProcessor();
scoreProcessor.ApplyBeatmap(playable);
LoadComponentAsync(leaderboard = new MultiplayerSpectatorLeaderboard(scoreProcessor, clocks.Keys.ToArray()) { Expanded = { Value = true } }, Add);
LoadComponentAsync(leaderboard = new MultiSpectatorLeaderboard(scoreProcessor, clocks.Keys.ToArray()) { Expanded = { Value = true } }, Add);
});
AddUntilStep("wait for load", () => leaderboard.IsLoaded);

View File

@ -9,9 +9,9 @@ using osu.Game.Screens.Play.HUD;
namespace osu.Game.Screens.OnlinePlay.Multiplayer.Spectate
{
public class MultiplayerSpectatorLeaderboard : MultiplayerGameplayLeaderboard
public class MultiSpectatorLeaderboard : MultiplayerGameplayLeaderboard
{
public MultiplayerSpectatorLeaderboard(ScoreProcessor scoreProcessor, int[] userIds)
public MultiSpectatorLeaderboard(ScoreProcessor scoreProcessor, int[] userIds)
: base(scoreProcessor, userIds)
{
}

View File

@ -11,13 +11,13 @@ using osu.Game.Screens.Play;
namespace osu.Game.Screens.OnlinePlay.Multiplayer.Spectate
{
public class MultiplayerSpectatorPlayer : SpectatorPlayer
public class MultiSpectatorPlayer : SpectatorPlayer
{
private readonly Bindable<bool> waitingOnFrames = new Bindable<bool>(true);
private readonly Score score;
private readonly ISlaveClock slaveClock;
public MultiplayerSpectatorPlayer(Score score, ISlaveClock slaveClock)
public MultiSpectatorPlayer(Score score, ISlaveClock slaveClock)
: base(score)
{
this.score = score;

View File

@ -8,9 +8,9 @@ using osu.Game.Screens.Play;
namespace osu.Game.Screens.OnlinePlay.Multiplayer.Spectate
{
public class MultiplayerSpectatorPlayerLoader : SpectatorPlayerLoader
public class MultiSpectatorPlayerLoader : SpectatorPlayerLoader
{
public MultiplayerSpectatorPlayerLoader(Score score, Func<MultiplayerSpectatorPlayer> createPlayer)
public MultiSpectatorPlayerLoader(Score score, Func<MultiSpectatorPlayer> createPlayer)
: base(score, createPlayer)
{
}

View File

@ -14,7 +14,7 @@ using osu.Game.Screens.Spectate;
namespace osu.Game.Screens.OnlinePlay.Multiplayer.Spectate
{
public class MultiplayerSpectator : SpectatorScreen
public class MultiSpectatorScreen : SpectatorScreen
{
// Isolates beatmap/ruleset to this screen.
public override bool DisallowExternalBeatmapRulesetChanges => true;
@ -28,10 +28,10 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Spectate
private MasterGameplayClockContainer masterClockContainer;
private ISyncManager syncManager;
private PlayerGrid grid;
private MultiplayerSpectatorLeaderboard leaderboard;
private MultiSpectatorLeaderboard leaderboard;
private PlayerInstance currentAudioSource;
public MultiplayerSpectator(int[] userIds)
public MultiSpectatorScreen(int[] userIds)
: base(userIds.AsSpan().Slice(0, Math.Min(16, userIds.Length)).ToArray())
{
instances = new PlayerInstance[UserIds.Length];
@ -76,7 +76,7 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Spectate
var scoreProcessor = Ruleset.Value.CreateInstance().CreateScoreProcessor();
scoreProcessor.ApplyBeatmap(playableBeatmap);
LoadComponentAsync(leaderboard = new MultiplayerSpectatorLeaderboard(scoreProcessor, UserIds) { Expanded = { Value = true } }, leaderboardContainer.Add);
LoadComponentAsync(leaderboard = new MultiSpectatorLeaderboard(scoreProcessor, UserIds) { Expanded = { Value = true } }, leaderboardContainer.Add);
}
protected override void LoadComplete()

View File

@ -7,7 +7,7 @@ using osu.Framework.Timing;
namespace osu.Game.Screens.OnlinePlay.Multiplayer.Spectate.Sync
{
/// <summary>
/// A clock which is used by <see cref="MultiplayerSpectatorPlayer"/>s and managed by an <see cref="ISyncManager"/>.
/// A clock which is used by <see cref="MultiSpectatorPlayer"/>s and managed by an <see cref="ISyncManager"/>.
/// </summary>
public interface ISlaveClock : IFrameBasedClock, IAdjustableClock
{