Fix `TaikoMascot` texture animation lookups

This commit is contained in:
Dean Herbert 2021-06-08 00:42:34 +09:00
parent 6d56e02ddb
commit 273d66a0e0
1 changed files with 10 additions and 2 deletions

View File

@ -85,8 +85,12 @@ public ManualMascotTextureAnimation(TaikoMascotAnimationState state)
}
[BackgroundDependencyLoader]
private void load(ISkinSource skin)
private void load(ISkinSource source)
{
ISkin skin = source.FindProvider(s => getAnimationFrame(s, state, 0) != null);
if (skin == null) return;
for (int frameIndex = 0; true; frameIndex++)
{
var texture = getAnimationFrame(skin, state, frameIndex);
@ -112,8 +116,12 @@ public ClearMascotTextureAnimation()
}
[BackgroundDependencyLoader]
private void load(ISkinSource skin)
private void load(ISkinSource source)
{
ISkin skin = source.FindProvider(s => getAnimationFrame(s, TaikoMascotAnimationState.Clear, 0) != null);
if (skin == null) return;
foreach (var frameIndex in clear_animation_sequence)
{
var texture = getAnimationFrame(skin, TaikoMascotAnimationState.Clear, frameIndex);