mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 19:03:08 +08:00
Make methods abstract
This commit is contained in:
parent
a219aa7ba2
commit
cc518feca7
@ -26,12 +26,12 @@ namespace osu.Game.Rulesets.Osu.Mods
|
|||||||
|
|
||||||
public override Type[] IncompatibleMods => new[] { typeof(OsuModSpinIn), typeof(OsuModTraceable) };
|
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)
|
private void applyCustomState(DrawableHitObject drawable, ArmedState state)
|
||||||
{
|
{
|
||||||
if (drawable is DrawableSpinner)
|
if (drawable is DrawableSpinner)
|
||||||
|
@ -27,12 +27,12 @@ namespace osu.Game.Rulesets.Osu.Mods
|
|||||||
private const int rotate_offset = 360;
|
private const int rotate_offset = 360;
|
||||||
private const float rotate_starting_width = 2;
|
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)
|
private void applyZoomState(DrawableHitObject drawable, ArmedState state)
|
||||||
{
|
{
|
||||||
if (drawable is DrawableSpinner)
|
if (drawable is DrawableSpinner)
|
||||||
|
@ -21,12 +21,12 @@ namespace osu.Game.Rulesets.Osu.Mods
|
|||||||
|
|
||||||
public override Type[] IncompatibleMods => new[] { typeof(OsuModHidden), typeof(OsuModSpinIn), typeof(OsuModObjectScaleTween) };
|
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)
|
private void applyTraceableState(DrawableHitObject drawable, ArmedState state)
|
||||||
{
|
{
|
||||||
if (!(drawable is DrawableOsuHitObject))
|
if (!(drawable is DrawableOsuHitObject))
|
||||||
|
@ -49,7 +49,6 @@ namespace osu.Game.Rulesets.Mods
|
|||||||
|
|
||||||
protected override void ApplyIncreasedVisibilityState(DrawableHitObject hitObject, ArmedState state)
|
protected override void ApplyIncreasedVisibilityState(DrawableHitObject hitObject, ArmedState state)
|
||||||
{
|
{
|
||||||
base.ApplyIncreasedVisibilityState(hitObject, state);
|
|
||||||
#pragma warning disable 618
|
#pragma warning disable 618
|
||||||
ApplyFirstObjectIncreaseVisibilityState(hitObject, state);
|
ApplyFirstObjectIncreaseVisibilityState(hitObject, state);
|
||||||
#pragma warning restore 618
|
#pragma warning restore 618
|
||||||
@ -57,7 +56,6 @@ namespace osu.Game.Rulesets.Mods
|
|||||||
|
|
||||||
protected override void ApplyNormalVisibilityState(DrawableHitObject hitObject, ArmedState state)
|
protected override void ApplyNormalVisibilityState(DrawableHitObject hitObject, ArmedState state)
|
||||||
{
|
{
|
||||||
base.ApplyNormalVisibilityState(hitObject, state);
|
|
||||||
#pragma warning disable 618
|
#pragma warning disable 618
|
||||||
ApplyHiddenState(hitObject, state);
|
ApplyHiddenState(hitObject, state);
|
||||||
#pragma warning restore 618
|
#pragma warning restore 618
|
||||||
|
@ -39,18 +39,14 @@ namespace osu.Game.Rulesets.Mods
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="hitObject">The hit object to apply the state change to.</param>
|
/// <param name="hitObject">The hit object to apply the state change to.</param>
|
||||||
/// <param name="state">The state of the hit object.</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>
|
/// <summary>
|
||||||
/// Apply a normal visibility state adjustment to an object.
|
/// Apply a normal visibility state adjustment to an object.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="hitObject">The hit object to apply the state change to.</param>
|
/// <param name="hitObject">The hit object to apply the state change to.</param>
|
||||||
/// <param name="state">The state of the hit object.</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)
|
public virtual void ReadFromConfig(OsuConfigManager config)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user