1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 07:42:57 +08:00

rm TestLegacySkin

This commit is contained in:
mcendu 2019-12-26 22:06:29 +08:00
parent 8ebfe5cfd8
commit 75d1e4cc76
No known key found for this signature in database
GPG Key ID: FBCD5D45163D6364

View File

@ -45,30 +45,5 @@ namespace osu.Game.Rulesets.Mania.Tests
Child = creationFunction()
});
}
private class TestLegacySkin : LegacySkin
{
private readonly bool extrapolateAnimations;
public TestLegacySkin(SkinInfo skin, IResourceStore<byte[]> storage, AudioManager audioManager, bool extrapolateAnimations)
: base(skin, storage, audioManager, "skin.ini")
{
this.extrapolateAnimations = extrapolateAnimations;
}
public override Texture GetTexture(string componentName)
{
// extrapolate frames to test longer animations
if (extrapolateAnimations)
{
var match = Regex.Match(componentName, "-([0-9]*)");
if (match.Length > 0 && int.TryParse(match.Groups[1].Value, out var number) && number < 60)
return base.GetTexture(componentName.Replace($"-{number}", $"-{number % 2}"));
}
return base.GetTexture(componentName);
}
}
}
}