mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 23:24:04 +09:00
Abstractify GameplayClockContainer
This commit is contained in:
@ -295,7 +295,7 @@ namespace osu.Game.Screens.Play
|
||||
IsBreakTime.BindValueChanged(onBreakTimeChanged, true);
|
||||
}
|
||||
|
||||
protected virtual GameplayClockContainer CreateGameplayClockContainer(WorkingBeatmap beatmap, double gameplayStart) => new GameplayClockContainer(beatmap, gameplayStart);
|
||||
protected virtual GameplayClockContainer CreateGameplayClockContainer(WorkingBeatmap beatmap, double gameplayStart) => new MasterGameplayClockContainer(beatmap, gameplayStart);
|
||||
|
||||
private Drawable createUnderlayComponents() =>
|
||||
DimmableStoryboard = new DimmableStoryboard(Beatmap.Value.Storyboard) { RelativeSizeAxes = Axes.Both };
|
||||
@ -342,7 +342,6 @@ namespace osu.Game.Screens.Play
|
||||
Action = () => PerformExit(true),
|
||||
IsPaused = { BindTarget = GameplayClockContainer.IsPaused }
|
||||
},
|
||||
PlayerSettingsOverlay = { PlaybackSettings = { UserPlaybackRate = { BindTarget = GameplayClockContainer.UserPlaybackRate } } },
|
||||
KeyCounter =
|
||||
{
|
||||
AlwaysVisible = { BindTarget = DrawableRuleset.HasReplayLoaded },
|
||||
@ -386,6 +385,9 @@ namespace osu.Game.Screens.Play
|
||||
}
|
||||
};
|
||||
|
||||
if (GameplayClockContainer is MasterGameplayClockContainer master)
|
||||
HUDOverlay.PlayerSettingsOverlay.PlaybackSettings.UserPlaybackRate.BindTarget = master.UserPlaybackRate;
|
||||
|
||||
if (!Configuration.AllowSkippingIntro)
|
||||
skipOverlay.Expire();
|
||||
|
||||
@ -533,7 +535,8 @@ namespace osu.Game.Screens.Play
|
||||
// user requested skip
|
||||
// disable sample playback to stop currently playing samples and perform skip
|
||||
samplePlaybackDisabled.Value = true;
|
||||
GameplayClockContainer.Skip();
|
||||
|
||||
(GameplayClockContainer as MasterGameplayClockContainer)?.Skip();
|
||||
|
||||
// return samplePlaybackDisabled.Value to what is defined by the beatmap's current state
|
||||
updateSampleDisabledState();
|
||||
@ -832,7 +835,7 @@ namespace osu.Game.Screens.Play
|
||||
|
||||
// GameplayClockContainer performs seeks / start / stop operations on the beatmap's track.
|
||||
// as we are no longer the current screen, we cannot guarantee the track is still usable.
|
||||
GameplayClockContainer?.StopUsingBeatmapClock();
|
||||
(GameplayClockContainer as MasterGameplayClockContainer)?.StopUsingBeatmapClock();
|
||||
|
||||
musicController.ResetTrackAdjustments();
|
||||
|
||||
|
Reference in New Issue
Block a user