1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-12 17:35:10 +08:00

Update other transformers with similar refactored logic

This commit is contained in:
Dean Herbert 2021-05-30 19:15:59 +09:00
parent 50d71faf56
commit 17574833fb
3 changed files with 139 additions and 143 deletions

View File

@ -120,14 +120,12 @@ namespace osu.Game.Rulesets.Mania.Skinning.Legacy
case ManiaSkinComponents.StageForeground:
return new LegacyStageForeground();
default:
return Source.GetDrawableComponent(component);
}
default:
return Source.GetDrawableComponent(component);
break;
}
return Source.GetDrawableComponent(component);
}
private Drawable getResult(HitResult result)

View File

@ -34,9 +34,8 @@ namespace osu.Game.Rulesets.Osu.Skinning.Legacy
public override Drawable GetDrawableComponent(ISkinComponent component)
{
if (!(component is OsuSkinComponent osuComponent))
return Source.GetDrawableComponent(component);
if (component is OsuSkinComponent osuComponent)
{
switch (osuComponent.Component)
{
case OsuSkinComponents.FollowPoint:
@ -115,12 +114,12 @@ namespace osu.Game.Rulesets.Osu.Skinning.Legacy
return new LegacyOldStyleSpinner();
return null;
default:
return Source.GetDrawableComponent(component);
}
}
return Source.GetDrawableComponent(component);
}
public override IBindable<TValue> GetConfig<TLookup, TValue>(TLookup lookup)
{
switch (lookup)

View File

@ -38,9 +38,8 @@ namespace osu.Game.Rulesets.Taiko.Skinning.Legacy
return Drawable.Empty().With(d => d.Expire());
}
if (!(component is TaikoSkinComponent taikoComponent))
return Source.GetDrawableComponent(component);
if (component is TaikoSkinComponent taikoComponent)
{
switch (taikoComponent.Component)
{
case TaikoSkinComponents.DrumRollBody:
@ -130,12 +129,12 @@ namespace osu.Game.Rulesets.Taiko.Skinning.Legacy
case TaikoSkinComponents.Mascot:
return new DrawableTaikoMascot();
default:
return Source.GetDrawableComponent(component);
}
}
return Source.GetDrawableComponent(component);
}
private string getHitName(TaikoSkinComponents component)
{
switch (component)