1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-12 15:22:55 +08:00

use GetAnimation for checking

This commit is contained in:
mcendu 2020-04-01 14:17:23 +08:00
parent 716c7fa07a
commit 87e5e98cae
No known key found for this signature in database
GPG Key ID: FBCD5D45163D6364

View File

@ -35,10 +35,10 @@ namespace osu.Game.Rulesets.Mania.Skinning
private void sourceChanged()
{
isLegacySkin = new Lazy<bool>(() => source.GetConfig<LegacySkinConfiguration.LegacySetting, decimal>(LegacySkinConfiguration.LegacySetting.Version) != null);
hasKeyTexture = new Lazy<bool>(() => source.GetTexture(
hasKeyTexture = new Lazy<bool>(() => source.GetAnimation(
source.GetConfig<LegacyManiaSkinConfigurationLookup, string>(
new LegacyManiaSkinConfigurationLookup(4, LegacyManiaSkinConfigurationLookups.KeyImage, 0))?.Value
?? $"mania-key1") != null);
?? $"mania-key1", true, true) != null);
}
public Drawable GetDrawableComponent(ISkinComponent component)