Move blocking fail logic into a base class

This commit is contained in:
Salman Ahmed
2019-07-02 01:47:39 +03:00
committed by KingLuigi4932
parent 72e5cbb07f
commit a8e8650ddd
5 changed files with 45 additions and 16 deletions

View File

@ -9,18 +9,15 @@ using osu.Game.Rulesets.Objects.Types;
using osu.Game.Rulesets.Osu.Objects;
using osu.Game.Rulesets.Osu.Objects.Drawables;
using osu.Game.Rulesets.UI;
using osu.Game.Screens.Play;
using static osu.Game.Input.Handlers.ReplayInputHandler;
namespace osu.Game.Rulesets.Osu.Mods
{
public class OsuModRelax : ModRelax, IApplicableFailOverride, IUpdatableByPlayfield, IApplicableToDrawableRuleset<OsuHitObject>, IApplicableToHUD
public class OsuModRelax : ModRelax, IUpdatableByPlayfield, IApplicableToDrawableRuleset<OsuHitObject>
{
public override string Description => @"You don't need to click. Give your clicking/tapping fingers a break from the heat of things.";
public override Type[] IncompatibleMods => base.IncompatibleMods.Append(typeof(OsuModAutopilot)).ToArray();
public bool AllowFail => false;
public void Update(Playfield playfield)
{
bool requiresHold = false;
@ -86,7 +83,5 @@ namespace osu.Game.Rulesets.Osu.Mods
osuInputManager = (OsuInputManager)drawableRuleset.KeyBindingInputManager;
osuInputManager.AllowUserPresses = false;
}
public void ApplyToHUD(HUDOverlay overlay) => overlay.HealthDisplay.Hide();
}
}