mirror of
https://github.com/ppy/osu.git
synced 2024-12-13 07:43:00 +08:00
Rename GameplayAdjustments -> AdjustmentsFromMods
This commit is contained in:
parent
b0b4da533a
commit
b559d4ecdf
@ -27,7 +27,7 @@ namespace osu.Game.Tests.NonVisual
|
||||
public TestGameplayClockContainer(IFrameBasedClock underlyingClock)
|
||||
: base(underlyingClock)
|
||||
{
|
||||
GameplayAdjustments.AddAdjustment(AdjustableProperty.Frequency, new BindableDouble(2.0));
|
||||
AdjustmentsFromMods.AddAdjustment(AdjustableProperty.Frequency, new BindableDouble(2.0));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -265,7 +265,7 @@ namespace osu.Game.Rulesets.UI
|
||||
|
||||
private readonly AudioAdjustments gameplayAdjustments = new AudioAdjustments();
|
||||
|
||||
public IAdjustableAudioComponent GameplayAdjustments => parentGameplayClock?.GameplayAdjustments ?? gameplayAdjustments;
|
||||
public IAdjustableAudioComponent AdjustmentsFromMods => parentGameplayClock?.AdjustmentsFromMods ?? gameplayAdjustments;
|
||||
|
||||
#endregion
|
||||
|
||||
|
@ -14,7 +14,10 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Spectate
|
||||
/// </summary>
|
||||
public class MultiSpectatorPlayer : SpectatorPlayer
|
||||
{
|
||||
public IAdjustableAudioComponent GameplayAdjustments => GameplayClockContainer.GameplayAdjustments;
|
||||
/// <summary>
|
||||
/// All adjustments applied to the clock of this <see cref="MultiSpectatorPlayer"/> which come from mods.
|
||||
/// </summary>
|
||||
public readonly AudioAdjustments ClockAdjustmentsFromMods = new AudioAdjustments();
|
||||
|
||||
private readonly SpectatorPlayerClock spectatorPlayerClock;
|
||||
|
||||
@ -56,6 +59,10 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Spectate
|
||||
}
|
||||
|
||||
protected override GameplayClockContainer CreateGameplayClockContainer(WorkingBeatmap beatmap, double gameplayStart)
|
||||
=> new GameplayClockContainer(spectatorPlayerClock);
|
||||
{
|
||||
var gameplayClockContainer = new GameplayClockContainer(spectatorPlayerClock);
|
||||
ClockAdjustmentsFromMods.BindAdjustments(gameplayClockContainer.AdjustmentsFromMods);
|
||||
return gameplayClockContainer;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -187,10 +187,10 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Spectate
|
||||
private void bindAudioAdjustments(PlayerArea first)
|
||||
{
|
||||
if (boundAdjustments != null)
|
||||
masterClockContainer.GameplayAdjustments.UnbindAdjustments(boundAdjustments);
|
||||
masterClockContainer.AdjustmentsFromMods.UnbindAdjustments(boundAdjustments);
|
||||
|
||||
boundAdjustments = first.GameplayAdjustments;
|
||||
masterClockContainer.GameplayAdjustments.BindAdjustments(boundAdjustments);
|
||||
boundAdjustments = first.ClockAdjustmentsFromMods;
|
||||
masterClockContainer.AdjustmentsFromMods.BindAdjustments(boundAdjustments);
|
||||
}
|
||||
|
||||
private bool isCandidateAudioSource(SpectatorPlayerClock? clock)
|
||||
|
@ -43,9 +43,9 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Spectate
|
||||
public readonly SpectatorPlayerClock SpectatorPlayerClock;
|
||||
|
||||
/// <summary>
|
||||
/// The gameplay 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>
|
||||
public readonly AudioAdjustments GameplayAdjustments = new AudioAdjustments();
|
||||
public readonly AudioAdjustments ClockAdjustmentsFromMods = new AudioAdjustments();
|
||||
|
||||
/// <summary>
|
||||
/// The currently-loaded score.
|
||||
@ -103,7 +103,7 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Spectate
|
||||
var player = new MultiSpectatorPlayer(Score, SpectatorPlayerClock);
|
||||
player.OnGameplayStarted += () => OnGameplayStarted?.Invoke();
|
||||
|
||||
GameplayAdjustments.BindAdjustments(player.GameplayAdjustments);
|
||||
ClockAdjustmentsFromMods.BindAdjustments(player.ClockAdjustmentsFromMods);
|
||||
|
||||
return player;
|
||||
}));
|
||||
|
@ -44,7 +44,7 @@ namespace osu.Game.Screens.Play
|
||||
/// </remarks>
|
||||
public double StartTime { get; protected set; }
|
||||
|
||||
public IAdjustableAudioComponent GameplayAdjustments { get; } = new AudioAdjustments();
|
||||
public IAdjustableAudioComponent AdjustmentsFromMods { get; } = new AudioAdjustments();
|
||||
|
||||
private readonly BindableBool isPaused = new BindableBool(true);
|
||||
|
||||
|
@ -17,8 +17,8 @@ namespace osu.Game.Screens.Play
|
||||
double rate = clock.Rate == 0 ? 1 : Math.Sign(clock.Rate);
|
||||
|
||||
return rate
|
||||
* clock.GameplayAdjustments.AggregateFrequency.Value
|
||||
* clock.GameplayAdjustments.AggregateTempo.Value;
|
||||
* clock.AdjustmentsFromMods.AggregateFrequency.Value
|
||||
* clock.AdjustmentsFromMods.AggregateTempo.Value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -19,9 +19,9 @@ namespace osu.Game.Screens.Play
|
||||
double StartTime { get; }
|
||||
|
||||
/// <summary>
|
||||
/// All adjustments applied to this clock which come from gameplay or mods.
|
||||
/// All adjustments applied to this clock which come from mods.
|
||||
/// </summary>
|
||||
IAdjustableAudioComponent GameplayAdjustments { get; }
|
||||
IAdjustableAudioComponent AdjustmentsFromMods { get; }
|
||||
|
||||
IBindable<bool> IsPaused { get; }
|
||||
}
|
||||
|
@ -201,7 +201,7 @@ namespace osu.Game.Screens.Play
|
||||
|
||||
musicController.ResetTrackAdjustments();
|
||||
|
||||
track.BindAdjustments(GameplayAdjustments);
|
||||
track.BindAdjustments(AdjustmentsFromMods);
|
||||
track.AddAdjustment(AdjustableProperty.Frequency, GameplayClock.ExternalPauseFrequencyAdjust);
|
||||
track.AddAdjustment(AdjustableProperty.Tempo, UserPlaybackRate);
|
||||
|
||||
@ -213,7 +213,7 @@ namespace osu.Game.Screens.Play
|
||||
if (!speedAdjustmentsApplied)
|
||||
return;
|
||||
|
||||
track.UnbindAdjustments(GameplayAdjustments);
|
||||
track.UnbindAdjustments(AdjustmentsFromMods);
|
||||
track.RemoveAdjustment(AdjustableProperty.Frequency, GameplayClock.ExternalPauseFrequencyAdjust);
|
||||
track.RemoveAdjustment(AdjustableProperty.Tempo, UserPlaybackRate);
|
||||
|
||||
|
@ -997,7 +997,7 @@ namespace osu.Game.Screens.Play
|
||||
mod.ApplyToHUD(HUDOverlay);
|
||||
|
||||
foreach (var mod in GameplayState.Mods.OfType<IApplicableToTrack>())
|
||||
mod.ApplyToTrack(GameplayClockContainer.GameplayAdjustments);
|
||||
mod.ApplyToTrack(GameplayClockContainer.AdjustmentsFromMods);
|
||||
|
||||
updateGameplayState();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user