Use separate classes for old and new catcher legacy skin element

- Fix catcher texture animation is reset for legacy old catcher skin
This commit is contained in:
ekrctb
2021-06-08 21:58:39 +09:00
parent 0192549d6c
commit 109a366722
3 changed files with 56 additions and 17 deletions

View File

@ -66,9 +66,14 @@ namespace osu.Game.Rulesets.Catch.Skinning.Legacy
return null;
case CatchSkinComponents.Catcher:
if (this.GetAnimation(@"fruit-ryuuta", true, true) != null ||
this.GetAnimation(@"fruit-catcher-idle", true, true) != null)
return new LegacyCatcher();
// New elements will be ignored when the old element exists.
if (GetTexture(@"fruit-ryuuta") != null ||
GetTexture(@"fruit-ryuuta-0") != null)
return new LegacyCatcherOld();
if (GetTexture(@"fruit-catcher-idle") != null ||
GetTexture(@"fruit-catcher-idle-0") != null)
return new LegacyCatcherNew();
return null;