mirror of
https://github.com/osukey/osukey.git
synced 2025-06-05 12:57:39 +09:00
Avoid unnecessary texture retrieval for non-animated sprites
This commit is contained in:
parent
d224405bc6
commit
d02b8d14f7
@ -142,9 +142,9 @@ namespace osu.Game.Skinning
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
var texture = GetTexture($"{componentName}-0");
|
Texture texture;
|
||||||
|
|
||||||
if (texture != null && animatable)
|
if (animatable && (texture = GetTexture($"{componentName}-0")) != null)
|
||||||
{
|
{
|
||||||
var animation = new TextureAnimation { DefaultFrameLength = default_frame_time };
|
var animation = new TextureAnimation { DefaultFrameLength = default_frame_time };
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user