mirror of
https://github.com/ppy/osu.git
synced 2025-01-19 12:22:57 +08:00
Add support for indexless mascot texture lookups
This commit is contained in:
parent
897ab4a9bb
commit
ea3ef37f9a
@ -91,10 +91,7 @@ namespace osu.Game.Rulesets.Taiko.Skinning
|
||||
return null;
|
||||
|
||||
case TaikoSkinComponents.Mascot:
|
||||
if (GetTexture("pippidonclear0") != null)
|
||||
return new DrawableTaikoMascot();
|
||||
|
||||
return null;
|
||||
return new DrawableTaikoMascot();
|
||||
}
|
||||
|
||||
return Source.GetDrawableComponent(component);
|
||||
|
@ -128,6 +128,13 @@ namespace osu.Game.Rulesets.Taiko.UI
|
||||
}
|
||||
|
||||
private static Texture getAnimationFrame(ISkin skin, TaikoMascotAnimationState state, int frameIndex)
|
||||
=> skin.GetTexture($"pippidon{state.ToString().ToLower()}{frameIndex}");
|
||||
{
|
||||
var texture = skin.GetTexture($"pippidon{state.ToString().ToLower()}{frameIndex}");
|
||||
|
||||
if (frameIndex == 0 && texture == null)
|
||||
texture = skin.GetTexture($"pippidon{state.ToString().ToLower()}");
|
||||
|
||||
return texture;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user