1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-12 16:02:55 +08:00

Make methods abstract

This commit is contained in:
smoogipoo 2020-11-05 16:03:10 +09:00
parent a219aa7ba2
commit cc518feca7
5 changed files with 11 additions and 17 deletions

View File

@ -26,12 +26,12 @@ namespace osu.Game.Rulesets.Osu.Mods
public override Type[] IncompatibleMods => new[] { typeof(OsuModSpinIn), typeof(OsuModTraceable) };
protected override void ApplyNormalVisibilityState(DrawableHitObject hitObject, ArmedState state)
protected override void ApplyIncreasedVisibilityState(DrawableHitObject hitObject, ArmedState state)
{
base.ApplyNormalVisibilityState(hitObject, state);
applyCustomState(hitObject, state);
}
protected override void ApplyNormalVisibilityState(DrawableHitObject hitObject, ArmedState state) => applyCustomState(hitObject, state);
private void applyCustomState(DrawableHitObject drawable, ArmedState state)
{
if (drawable is DrawableSpinner)

View File

@ -27,12 +27,12 @@ namespace osu.Game.Rulesets.Osu.Mods
private const int rotate_offset = 360;
private const float rotate_starting_width = 2;
protected override void ApplyNormalVisibilityState(DrawableHitObject hitObject, ArmedState state)
protected override void ApplyIncreasedVisibilityState(DrawableHitObject hitObject, ArmedState state)
{
base.ApplyNormalVisibilityState(hitObject, state);
applyZoomState(hitObject, state);
}
protected override void ApplyNormalVisibilityState(DrawableHitObject hitObject, ArmedState state) => applyZoomState(hitObject, state);
private void applyZoomState(DrawableHitObject drawable, ArmedState state)
{
if (drawable is DrawableSpinner)

View File

@ -21,12 +21,12 @@ namespace osu.Game.Rulesets.Osu.Mods
public override Type[] IncompatibleMods => new[] { typeof(OsuModHidden), typeof(OsuModSpinIn), typeof(OsuModObjectScaleTween) };
protected override void ApplyNormalVisibilityState(DrawableHitObject hitObject, ArmedState state)
protected override void ApplyIncreasedVisibilityState(DrawableHitObject hitObject, ArmedState state)
{
base.ApplyNormalVisibilityState(hitObject, state);
applyTraceableState(hitObject, state);
}
protected override void ApplyNormalVisibilityState(DrawableHitObject hitObject, ArmedState state) => applyTraceableState(hitObject, state);
private void applyTraceableState(DrawableHitObject drawable, ArmedState state)
{
if (!(drawable is DrawableOsuHitObject))

View File

@ -49,7 +49,6 @@ namespace osu.Game.Rulesets.Mods
protected override void ApplyIncreasedVisibilityState(DrawableHitObject hitObject, ArmedState state)
{
base.ApplyIncreasedVisibilityState(hitObject, state);
#pragma warning disable 618
ApplyFirstObjectIncreaseVisibilityState(hitObject, state);
#pragma warning restore 618
@ -57,7 +56,6 @@ namespace osu.Game.Rulesets.Mods
protected override void ApplyNormalVisibilityState(DrawableHitObject hitObject, ArmedState state)
{
base.ApplyNormalVisibilityState(hitObject, state);
#pragma warning disable 618
ApplyHiddenState(hitObject, state);
#pragma warning restore 618

View File

@ -39,18 +39,14 @@ namespace osu.Game.Rulesets.Mods
/// </summary>
/// <param name="hitObject">The hit object to apply the state change to.</param>
/// <param name="state">The state of the hit object.</param>
protected virtual void ApplyIncreasedVisibilityState(DrawableHitObject hitObject, ArmedState state)
{
}
protected abstract void ApplyIncreasedVisibilityState(DrawableHitObject hitObject, ArmedState state);
/// <summary>
/// Apply a normal visibility state adjustment to an object.
/// </summary>
/// <param name="hitObject">The hit object to apply the state change to.</param>
/// <param name="state">The state of the hit object.</param>
protected virtual void ApplyNormalVisibilityState(DrawableHitObject hitObject, ArmedState state)
{
}
protected abstract void ApplyNormalVisibilityState(DrawableHitObject hitObject, ArmedState state);
public virtual void ReadFromConfig(OsuConfigManager config)
{