mirror of
https://github.com/ppy/osu.git
synced 2025-02-21 22:12:53 +08:00
Improve code readability
This commit is contained in:
parent
f00799cc64
commit
df248ea41b
@ -26,9 +26,11 @@ namespace osu.Game.Rulesets.Catch.Skinning.Legacy
|
||||
{
|
||||
if (component is SkinnableTargetComponent targetComponent && targetComponent.Target == SkinnableTarget.MainHUDComponents)
|
||||
{
|
||||
if (!providesComboCounter || !(Source.GetDrawableComponent(component) is SkinnableTargetComponentsContainer components))
|
||||
if (!providesComboCounter)
|
||||
return null;
|
||||
|
||||
if (Source.GetDrawableComponent(component) is SkinnableTargetComponentsContainer components)
|
||||
{
|
||||
// catch may provide its own combo counter; hide the default.
|
||||
// todo: this should probably be done in an elegant way.
|
||||
foreach (var legacyComboCounter in components.OfType<LegacyComboCounter>())
|
||||
@ -37,6 +39,9 @@ namespace osu.Game.Rulesets.Catch.Skinning.Legacy
|
||||
return components;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
if (!(component is CatchSkinComponent catchSkinComponent))
|
||||
return null;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user