mirror of
https://github.com/osukey/osukey.git
synced 2025-08-08 09:03:50 +09:00
make IsBreakTime its own bindable and bind it to BreakTracker on load
This commit is contained in:
@ -89,7 +89,10 @@ namespace osu.Game.Screens.Play
|
|||||||
|
|
||||||
public BreakOverlay BreakOverlay;
|
public BreakOverlay BreakOverlay;
|
||||||
|
|
||||||
public IBindable<bool> IsBreakTime => breakTracker?.IsBreakTime;
|
/// <summary>
|
||||||
|
/// Whether the gameplay is currently in a break.
|
||||||
|
/// </summary>
|
||||||
|
public readonly BindableBool IsBreakTime = new BindableBool();
|
||||||
|
|
||||||
private BreakTracker breakTracker;
|
private BreakTracker breakTracker;
|
||||||
|
|
||||||
@ -259,6 +262,7 @@ namespace osu.Game.Screens.Play
|
|||||||
mod.ApplyToHealthProcessor(HealthProcessor);
|
mod.ApplyToHealthProcessor(HealthProcessor);
|
||||||
|
|
||||||
breakTracker.IsBreakTime.BindValueChanged(onBreakTimeChanged, true);
|
breakTracker.IsBreakTime.BindValueChanged(onBreakTimeChanged, true);
|
||||||
|
IsBreakTime.BindTo((BindableBool)breakTracker.IsBreakTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
private Drawable createUnderlayComponents() =>
|
private Drawable createUnderlayComponents() =>
|
||||||
|
Reference in New Issue
Block a user