1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 12:42:54 +08:00

make IsBreakTime its own bindable and bind it to BreakTracker on load

This commit is contained in:
unknown 2020-10-11 06:15:20 +08:00
parent 7bbdd6ab25
commit 6a52c98a42

View File

@ -89,7 +89,10 @@ namespace osu.Game.Screens.Play
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;
@ -259,6 +262,7 @@ namespace osu.Game.Screens.Play
mod.ApplyToHealthProcessor(HealthProcessor);
breakTracker.IsBreakTime.BindValueChanged(onBreakTimeChanged, true);
IsBreakTime.BindTo((BindableBool)breakTracker.IsBreakTime);
}
private Drawable createUnderlayComponents() =>