mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 17:32:54 +08:00
Expose as readonly IAggregateAudioAdjustment
This commit is contained in:
parent
b559d4ecdf
commit
c61c596c1f
@ -17,8 +17,9 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Spectate
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// All adjustments applied to the clock of this <see cref="MultiSpectatorPlayer"/> which come from mods.
|
/// All adjustments applied to the clock of this <see cref="MultiSpectatorPlayer"/> which come from mods.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public readonly AudioAdjustments ClockAdjustmentsFromMods = new AudioAdjustments();
|
public IAggregateAudioAdjustment ClockAdjustmentsFromMods => clockAdjustmentsFromMods;
|
||||||
|
|
||||||
|
private readonly AudioAdjustments clockAdjustmentsFromMods = new AudioAdjustments();
|
||||||
private readonly SpectatorPlayerClock spectatorPlayerClock;
|
private readonly SpectatorPlayerClock spectatorPlayerClock;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -61,7 +62,7 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Spectate
|
|||||||
protected override GameplayClockContainer CreateGameplayClockContainer(WorkingBeatmap beatmap, double gameplayStart)
|
protected override GameplayClockContainer CreateGameplayClockContainer(WorkingBeatmap beatmap, double gameplayStart)
|
||||||
{
|
{
|
||||||
var gameplayClockContainer = new GameplayClockContainer(spectatorPlayerClock);
|
var gameplayClockContainer = new GameplayClockContainer(spectatorPlayerClock);
|
||||||
ClockAdjustmentsFromMods.BindAdjustments(gameplayClockContainer.AdjustmentsFromMods);
|
clockAdjustmentsFromMods.BindAdjustments(gameplayClockContainer.AdjustmentsFromMods);
|
||||||
return gameplayClockContainer;
|
return gameplayClockContainer;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -44,7 +44,7 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Spectate
|
|||||||
[Resolved]
|
[Resolved]
|
||||||
private MultiplayerClient multiplayerClient { get; set; } = null!;
|
private MultiplayerClient multiplayerClient { get; set; } = null!;
|
||||||
|
|
||||||
private AudioAdjustments? boundAdjustments;
|
private IAggregateAudioAdjustment? boundAdjustments;
|
||||||
|
|
||||||
private readonly PlayerArea[] instances;
|
private readonly PlayerArea[] instances;
|
||||||
private MasterGameplayClockContainer masterClockContainer = null!;
|
private MasterGameplayClockContainer masterClockContainer = null!;
|
||||||
|
@ -45,7 +45,7 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Spectate
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// The clock adjustments applied by the <see cref="Player"/> loaded in this area.
|
/// The clock adjustments applied by the <see cref="Player"/> loaded in this area.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public readonly AudioAdjustments ClockAdjustmentsFromMods = new AudioAdjustments();
|
public IAggregateAudioAdjustment ClockAdjustmentsFromMods => clockAdjustmentsFromMods;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The currently-loaded score.
|
/// The currently-loaded score.
|
||||||
@ -55,6 +55,7 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Spectate
|
|||||||
[Resolved]
|
[Resolved]
|
||||||
private IBindable<WorkingBeatmap> beatmap { get; set; } = null!;
|
private IBindable<WorkingBeatmap> beatmap { get; set; } = null!;
|
||||||
|
|
||||||
|
private readonly AudioAdjustments clockAdjustmentsFromMods = new AudioAdjustments();
|
||||||
private readonly BindableDouble volumeAdjustment = new BindableDouble();
|
private readonly BindableDouble volumeAdjustment = new BindableDouble();
|
||||||
private readonly Container gameplayContent;
|
private readonly Container gameplayContent;
|
||||||
private readonly LoadingLayer loadingLayer;
|
private readonly LoadingLayer loadingLayer;
|
||||||
@ -101,9 +102,12 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Spectate
|
|||||||
stack.Push(new MultiSpectatorPlayerLoader(Score, () =>
|
stack.Push(new MultiSpectatorPlayerLoader(Score, () =>
|
||||||
{
|
{
|
||||||
var player = new MultiSpectatorPlayer(Score, SpectatorPlayerClock);
|
var player = new MultiSpectatorPlayer(Score, SpectatorPlayerClock);
|
||||||
player.OnGameplayStarted += () => OnGameplayStarted?.Invoke();
|
|
||||||
|
|
||||||
ClockAdjustmentsFromMods.BindAdjustments(player.ClockAdjustmentsFromMods);
|
player.OnGameplayStarted += () =>
|
||||||
|
{
|
||||||
|
clockAdjustmentsFromMods.BindAdjustments(player.ClockAdjustmentsFromMods);
|
||||||
|
OnGameplayStarted?.Invoke();
|
||||||
|
};
|
||||||
|
|
||||||
return player;
|
return player;
|
||||||
}));
|
}));
|
||||||
|
Loading…
Reference in New Issue
Block a user