1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-13 13:32:54 +08:00

remove unused method and fix description

This commit is contained in:
Nitrous 2022-01-29 21:09:36 +08:00
parent aa582fb0e1
commit 2326c36836
No known key found for this signature in database
GPG Key ID: 85EC4A6AE8F69D64
2 changed files with 4 additions and 9 deletions

View File

@ -37,9 +37,5 @@ namespace osu.Game.Rulesets.Osu.Mods
return false;
}
protected override void OnReleased(OsuAction key)
{
}
}
}

View File

@ -17,7 +17,7 @@ namespace osu.Game.Rulesets.Mods
{
public override string Name => @"Alternate";
public override string Acronym => @"AL";
public override string Description => @"Never hit the same key twice!";
public override string Description => @"Don't use the same key twice in a row!";
public override double ScoreMultiplier => 1.0;
public override Type[] IncompatibleMods => new[] { typeof(ModAutoplay) };
public override ModType Type => ModType.DifficultyIncrease;
@ -28,6 +28,9 @@ namespace osu.Game.Rulesets.Mods
where THitObject : HitObject
where TAction : struct
{
/// <summary>
/// Whether incoming input must be checked by <see cref="InputInterceptor"/>.
/// </summary>
public bool CanIntercept => !isBreakTime.Value;
private IBindable<bool> isBreakTime;
@ -51,8 +54,6 @@ namespace osu.Game.Rulesets.Mods
protected abstract bool OnPressed(TAction key);
protected abstract void OnReleased(TAction key);
private class InputInterceptor : Component, IKeyBindingHandler<TAction>
{
private readonly ModAlternate<THitObject, TAction> mod;
@ -69,8 +70,6 @@ namespace osu.Game.Rulesets.Mods
public void OnReleased(KeyBindingReleaseEvent<TAction> e)
{
if (mod.CanIntercept)
mod.OnReleased(e.Action);
}
}
}