mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 22:56:36 +09:00
Merge branch 'master' into fix-minia-mod-replay-recording
This commit is contained in:
@ -76,6 +76,8 @@ namespace osu.Game.Screens.Play
|
||||
|
||||
public BreakOverlay BreakOverlay;
|
||||
|
||||
private BreakTracker breakTracker;
|
||||
|
||||
protected ScoreProcessor ScoreProcessor { get; private set; }
|
||||
|
||||
protected HealthProcessor HealthProcessor { get; private set; }
|
||||
@ -204,7 +206,7 @@ namespace osu.Game.Screens.Play
|
||||
foreach (var mod in Mods.Value.OfType<IApplicableToHealthProcessor>())
|
||||
mod.ApplyToHealthProcessor(HealthProcessor);
|
||||
|
||||
BreakOverlay.IsBreakTime.BindValueChanged(onBreakTimeChanged, true);
|
||||
breakTracker.IsBreakTime.BindValueChanged(onBreakTimeChanged, true);
|
||||
}
|
||||
|
||||
private void addUnderlayComponents(Container target)
|
||||
@ -231,6 +233,18 @@ namespace osu.Game.Screens.Play
|
||||
DrawableRuleset,
|
||||
new ComboEffects(ScoreProcessor)
|
||||
});
|
||||
|
||||
DrawableRuleset.FrameStableComponents.AddRange(new Drawable[]
|
||||
{
|
||||
ScoreProcessor,
|
||||
HealthProcessor,
|
||||
breakTracker = new BreakTracker(DrawableRuleset.GameplayStartTime, ScoreProcessor)
|
||||
{
|
||||
Breaks = working.Beatmap.Breaks
|
||||
}
|
||||
});
|
||||
|
||||
HealthProcessor.IsBreakTime.BindTo(breakTracker.IsBreakTime);
|
||||
}
|
||||
|
||||
private void addOverlayComponents(Container target, WorkingBeatmap working)
|
||||
@ -293,20 +307,14 @@ namespace osu.Game.Screens.Play
|
||||
performImmediateExit();
|
||||
},
|
||||
},
|
||||
failAnimation = new FailAnimation(DrawableRuleset) { OnComplete = onFailComplete, }
|
||||
failAnimation = new FailAnimation(DrawableRuleset) { OnComplete = onFailComplete, },
|
||||
BreakOverlay = new BreakOverlay(working.Beatmap.BeatmapInfo.LetterboxInBreaks)
|
||||
{
|
||||
Clock = DrawableRuleset.FrameStableClock,
|
||||
ProcessCustomClock = false,
|
||||
Breaks = working.Beatmap.Breaks
|
||||
},
|
||||
});
|
||||
|
||||
DrawableRuleset.Overlays.Add(BreakOverlay = new BreakOverlay(working.Beatmap.BeatmapInfo.LetterboxInBreaks, DrawableRuleset.GameplayStartTime, ScoreProcessor)
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
Breaks = working.Beatmap.Breaks
|
||||
});
|
||||
|
||||
DrawableRuleset.Overlays.Add(ScoreProcessor);
|
||||
DrawableRuleset.Overlays.Add(HealthProcessor);
|
||||
|
||||
HealthProcessor.IsBreakTime.BindTo(BreakOverlay.IsBreakTime);
|
||||
}
|
||||
|
||||
private void onBreakTimeChanged(ValueChangedEvent<bool> isBreakTime)
|
||||
@ -318,7 +326,7 @@ namespace osu.Game.Screens.Play
|
||||
private void updatePauseOnFocusLostState() =>
|
||||
HUDOverlay.HoldToQuit.PauseOnFocusLost = PauseOnFocusLost
|
||||
&& !DrawableRuleset.HasReplayLoaded.Value
|
||||
&& !BreakOverlay.IsBreakTime.Value;
|
||||
&& !breakTracker.IsBreakTime.Value;
|
||||
|
||||
private IBeatmap loadPlayableBeatmap()
|
||||
{
|
||||
@ -540,7 +548,7 @@ namespace osu.Game.Screens.Play
|
||||
PauseOverlay.Hide();
|
||||
|
||||
// breaks and time-based conditions may allow instant resume.
|
||||
if (BreakOverlay.IsBreakTime.Value)
|
||||
if (breakTracker.IsBreakTime.Value)
|
||||
completeResume();
|
||||
else
|
||||
DrawableRuleset.RequestResume(completeResume);
|
||||
@ -574,8 +582,8 @@ namespace osu.Game.Screens.Play
|
||||
Background.BlurAmount.Value = 0;
|
||||
|
||||
// bind component bindables.
|
||||
Background.IsBreakTime.BindTo(BreakOverlay.IsBreakTime);
|
||||
DimmableStoryboard.IsBreakTime.BindTo(BreakOverlay.IsBreakTime);
|
||||
Background.IsBreakTime.BindTo(breakTracker.IsBreakTime);
|
||||
DimmableStoryboard.IsBreakTime.BindTo(breakTracker.IsBreakTime);
|
||||
|
||||
Background.StoryboardReplacesBackground.BindTo(storyboardReplacesBackground);
|
||||
DimmableStoryboard.StoryboardReplacesBackground.BindTo(storyboardReplacesBackground);
|
||||
|
Reference in New Issue
Block a user