1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 18:07:23 +08:00

Restructure lookup code to avoid repeating the base call

This commit is contained in:
Dean Herbert 2021-05-30 17:55:10 +09:00
parent fbc316ea1d
commit 50d71faf56

View File

@ -35,9 +35,8 @@ namespace osu.Game.Rulesets.Catch.Skinning.Legacy
}
}
if (!(component is CatchSkinComponent catchSkinComponent))
return Source.GetDrawableComponent(component);
if (component is CatchSkinComponent catchSkinComponent)
{
switch (catchSkinComponent.Component)
{
case CatchSkinComponents.Fruit:
@ -75,12 +74,12 @@ namespace osu.Game.Rulesets.Catch.Skinning.Legacy
return new LegacyCatchComboCounter(Source);
return null;
default:
return Source.GetDrawableComponent(component);
}
}
return Source.GetDrawableComponent(component);
}
public override IBindable<TValue> GetConfig<TLookup, TValue>(TLookup lookup)
{
switch (lookup)