mirror of
https://github.com/osukey/osukey.git
synced 2025-05-04 21:27:22 +09:00
Ensure all frames in an animation are retrieved from the same skin
This commit is contained in:
parent
06275a6a7d
commit
37c8c63fc5
@ -54,9 +54,16 @@ namespace osu.Game.Skinning
|
|||||||
|
|
||||||
IEnumerable<Texture> getTextures()
|
IEnumerable<Texture> getTextures()
|
||||||
{
|
{
|
||||||
|
ISkin lookupSource = null;
|
||||||
|
|
||||||
for (int i = 0; true; i++)
|
for (int i = 0; true; i++)
|
||||||
{
|
{
|
||||||
if ((texture = source.GetTexture($"{componentName}{animationSeparator}{i}", wrapModeS, wrapModeT)) == null)
|
string frameName = $"{componentName}{animationSeparator}{i}";
|
||||||
|
|
||||||
|
// ensure all textures are retrieved from the same skin source.
|
||||||
|
lookupSource ??= source.FindProvider(s => s.GetTexture(frameName, wrapModeS, wrapModeT) != null);
|
||||||
|
|
||||||
|
if ((texture = lookupSource?.GetTexture(frameName, wrapModeS, wrapModeT)) == null)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
yield return texture;
|
yield return texture;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user