protected virtual void UpdateSkinSources() { SkinSources.Clear(); foreach (var skin in parentSource.AllSources) { switch (skin) { case LegacySkin legacySkin: SkinSources.Add(GetLegacyRulesetTransformedSkin(legacySkin)); break; default: SkinSources.Add(skin); break; } } int lastDefaultSkinIndex = SkinSources.IndexOf(SkinSources.OfType <DefaultSkin>().LastOrDefault()); // Ruleset resources should be given the ability to override game-wide defaults // This is achieved by placing them before the last instance of DefaultSkin. // Note that DefaultSkin may not be present in some test scenes. if (lastDefaultSkinIndex >= 0) { SkinSources.Insert(lastDefaultSkinIndex, rulesetResourcesSkin); } else { SkinSources.Add(rulesetResourcesSkin); } }
protected virtual void UpdateSkins() { SkinSources.Clear(); foreach (var skin in skinSource.AllSources) { switch (skin) { case LegacySkin legacySkin: SkinSources.Add(GetLegacyRulesetTransformedSkin(legacySkin)); break; default: SkinSources.Add(skin); break; } } }