mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 09:07:52 +08:00
slight restructure + comments
This commit is contained in:
parent
f2c98dd064
commit
70a502771b
@ -35,21 +35,19 @@ namespace osu.Game.Rulesets.Osu.UI
|
|||||||
|
|
||||||
protected new OsuRulesetConfigManager Config => (OsuRulesetConfigManager)base.Config;
|
protected new OsuRulesetConfigManager Config => (OsuRulesetConfigManager)base.Config;
|
||||||
|
|
||||||
[Resolved]
|
|
||||||
private MultiSpectatorScreen? multiSpectatorScreen { get; set; }
|
|
||||||
|
|
||||||
public DrawableOsuRuleset(Ruleset ruleset, IBeatmap beatmap, IReadOnlyList<Mod>? mods = null)
|
public DrawableOsuRuleset(Ruleset ruleset, IBeatmap beatmap, IReadOnlyList<Mod>? mods = null)
|
||||||
: base(ruleset, beatmap, mods)
|
: base(ruleset, beatmap, mods)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(Player? player)
|
private void load(Player? player, MultiSpectatorScreen? multiSpectatorScreen)
|
||||||
{
|
{
|
||||||
if (player is ReplayPlayer || player is SpectatorPlayer)
|
if (player is ReplayPlayer || player is SpectatorPlayer)
|
||||||
{
|
{
|
||||||
PlayfieldAdjustmentContainer.Add(new ReplayAnalysisOverlay(player.Score.Replay));
|
PlayfieldAdjustmentContainer.Add(new ReplayAnalysisOverlay(player.Score.Replay));
|
||||||
|
|
||||||
|
// if in multiplayer spectator mode, place the settings elsewhere
|
||||||
if (multiSpectatorScreen == null)
|
if (multiSpectatorScreen == null)
|
||||||
player.AddSettings(new ReplayAnalysisSettings(Config));
|
player.AddSettings(new ReplayAnalysisSettings(Config));
|
||||||
else if (!multiSpectatorScreen.SettingsAdded)
|
else if (!multiSpectatorScreen.SettingsAdded)
|
||||||
|
@ -59,8 +59,12 @@ namespace osu.Game.Rulesets.Osu.UI
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// false for loading, true for loaded
|
/// Invalidated when containers are not loaded nor loading, false if loading, and true if loaded
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Knowing the loading/loaded state is for avoiding an enumeration error when adding
|
||||||
|
/// new entries and not starting a new load while loading
|
||||||
|
/// </remarks>
|
||||||
private readonly Cached<bool> loadState = new Cached<bool>();
|
private readonly Cached<bool> loadState = new Cached<bool>();
|
||||||
|
|
||||||
private CancellationTokenSource? generationCancellationSource;
|
private CancellationTokenSource? generationCancellationSource;
|
||||||
|
Loading…
Reference in New Issue
Block a user