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,15 +26,20 @@ namespace osu.Game.Rulesets.Catch.Skinning.Legacy
|
|||||||
{
|
{
|
||||||
if (component is SkinnableTargetComponent targetComponent && targetComponent.Target == SkinnableTarget.MainHUDComponents)
|
if (component is SkinnableTargetComponent targetComponent && targetComponent.Target == SkinnableTarget.MainHUDComponents)
|
||||||
{
|
{
|
||||||
if (!providesComboCounter || !(Source.GetDrawableComponent(component) is SkinnableTargetComponentsContainer components))
|
if (!providesComboCounter)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
// catch may provide its own combo counter; hide the default.
|
if (Source.GetDrawableComponent(component) is SkinnableTargetComponentsContainer components)
|
||||||
// todo: this should probably be done in an elegant way.
|
{
|
||||||
foreach (var legacyComboCounter in components.OfType<LegacyComboCounter>())
|
// catch may provide its own combo counter; hide the default.
|
||||||
legacyComboCounter.Expire();
|
// todo: this should probably be done in an elegant way.
|
||||||
|
foreach (var legacyComboCounter in components.OfType<LegacyComboCounter>())
|
||||||
|
legacyComboCounter.Expire();
|
||||||
|
|
||||||
return components;
|
return components;
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(component is CatchSkinComponent catchSkinComponent))
|
if (!(component is CatchSkinComponent catchSkinComponent))
|
||||||
|
Loading…
Reference in New Issue
Block a user