Remove unnecessary local derived classes

This commit is contained in:
Dean Herbert 2017-12-29 17:10:33 +09:00
parent b74248a705
commit 2c61ebbcd9
3 changed files with 3 additions and 20 deletions

View File

@ -65,7 +65,7 @@ namespace osu.Game.Rulesets.Osu.Tests
drawable.State.Value = ArmedState.Hit;
if (hidden)
drawable.ApplyCustomUpdateState += new TestOsuModHidden().ApplyHiddenState;
new OsuModHidden().ApplyToDrawableHitObjects(new [] { drawable });
Add(drawable);
}
@ -81,11 +81,6 @@ namespace osu.Game.Rulesets.Osu.Tests
}
}
private class TestOsuModHidden : OsuModHidden
{
public new void ApplyHiddenState(DrawableHitObject drawable, ArmedState state) => base.ApplyHiddenState(drawable, state);
}
private class TestDrawableHitCircle : DrawableHitCircle
{
private readonly bool auto;

View File

@ -14,7 +14,6 @@ using osu.Game.Rulesets.Osu.Objects.Drawables;
using osu.Game.Tests.Visual;
using OpenTK;
using osu.Game.Rulesets.Osu.Mods;
using osu.Game.Rulesets.Objects.Drawables;
namespace osu.Game.Rulesets.Osu.Tests
{
@ -126,15 +125,10 @@ namespace osu.Game.Rulesets.Osu.Tests
};
if (hidden)
drawable.ApplyCustomUpdateState += new TestOsuModHidden().CustomSequence;
new OsuModHidden().ApplyToDrawableHitObjects(new [] { drawable });
Add(drawable);
}
private class TestOsuModHidden : OsuModHidden
{
public new void CustomSequence(DrawableHitObject drawable, ArmedState state) => base.ApplyHiddenState(drawable, state);
}
}
}

View File

@ -7,7 +7,6 @@ using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Game.Beatmaps;
using osu.Game.Beatmaps.ControlPoints;
using osu.Game.Rulesets.Objects.Drawables;
using osu.Game.Rulesets.Osu.Mods;
using osu.Game.Rulesets.Osu.Objects;
using osu.Game.Rulesets.Osu.Objects.Drawables;
@ -50,14 +49,9 @@ namespace osu.Game.Rulesets.Osu.Tests
};
if (hidden)
drawable.ApplyCustomUpdateState += new TestOsuModHidden().CustomSequence;
new OsuModHidden().ApplyToDrawableHitObjects(new [] { drawable });
Add(drawable);
}
private class TestOsuModHidden : OsuModHidden
{
public new void CustomSequence(DrawableHitObject drawable, ArmedState state) => base.ApplyHiddenState(drawable, state);
}
}
}