mirror of
https://github.com/ppy/osu.git
synced 2024-11-14 20:38:33 +08:00
84919d70bb
Also inverts logic
30 lines
865 B
C#
30 lines
865 B
C#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
|
// See the LICENCE file in the repository root for full licence text.
|
|
|
|
using osu.Framework.Bindables;
|
|
using osu.Game.Configuration;
|
|
using osu.Game.Screens.Play;
|
|
|
|
namespace osu.Game.Rulesets.Mods
|
|
{
|
|
public abstract class ModBlockFail : Mod, IApplicableFailOverride, IApplicableToHUD, IReadFromConfig
|
|
{
|
|
private Bindable<bool> showHealthBar;
|
|
|
|
/// <summary>
|
|
/// We never fail, 'yo.
|
|
/// </summary>
|
|
public bool AllowFail => false;
|
|
|
|
public void ReadFromConfig(OsuConfigManager config)
|
|
{
|
|
showHealthBar = config.GetBindable<bool>(OsuSetting.ShowHealthDisplayWhenCantFail);
|
|
}
|
|
|
|
public void ApplyToHUD(HUDOverlay overlay)
|
|
{
|
|
overlay.ShowHealthbar.BindTo(showHealthBar);
|
|
}
|
|
}
|
|
}
|