mirror of
https://github.com/ppy/osu.git
synced 2025-01-13 12:53:11 +08:00
Simplify pre-checks in HitObjectApplied
delegate
This commit is contained in:
parent
ded99c4097
commit
121fa6f165
@ -109,11 +109,6 @@ namespace osu.Game.Rulesets.Osu.Skinning.Legacy
|
|||||||
|
|
||||||
private void onHitObjectApplied(DrawableHitObject? drawableObject = null)
|
private void onHitObjectApplied(DrawableHitObject? drawableObject = null)
|
||||||
{
|
{
|
||||||
if (drawableObject != null && drawableObject is not DrawableSlider)
|
|
||||||
return;
|
|
||||||
|
|
||||||
ballAnimation.ClearFrames();
|
|
||||||
|
|
||||||
double frameDelay;
|
double frameDelay;
|
||||||
|
|
||||||
if (drawableObject?.HitObject != null)
|
if (drawableObject?.HitObject != null)
|
||||||
@ -127,6 +122,7 @@ namespace osu.Game.Rulesets.Osu.Skinning.Legacy
|
|||||||
else
|
else
|
||||||
frameDelay = LegacySkinExtensions.SIXTY_FRAME_TIME;
|
frameDelay = LegacySkinExtensions.SIXTY_FRAME_TIME;
|
||||||
|
|
||||||
|
ballAnimation.ClearFrames();
|
||||||
foreach (var texture in ballTextures)
|
foreach (var texture in ballTextures)
|
||||||
ballAnimation.AddFrame(texture, frameDelay);
|
ballAnimation.AddFrame(texture, frameDelay);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user