Skip to content

Commit

Permalink
Legacy skin should inherit the default skin transformer for able to i…
Browse files Browse the repository at this point in the history
…nherit the base logic.
  • Loading branch information
andy840119 committed Apr 29, 2023
1 parent e43b2d0 commit 431c8a0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ namespace osu.Game.Rulesets.Karaoke.Skinning.Legacy
{
public class KaraokeClassicSkinTransformer : KaraokeLegacySkinTransformer
{
public KaraokeClassicSkinTransformer(ISkin source, IBeatmap beatmap)
: base(source, beatmap)
public KaraokeClassicSkinTransformer(ISkin skin, IBeatmap beatmap)
: base(skin, beatmap)
{
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,24 @@
using osu.Framework.Bindables;
using osu.Framework.Graphics;
using osu.Game.Beatmaps;
using osu.Game.Rulesets.Karaoke.Skinning.Default;
using osu.Game.Rulesets.Scoring;
using osu.Game.Skinning;

namespace osu.Game.Rulesets.Karaoke.Skinning.Legacy
{
public class KaraokeLegacySkinTransformer : LegacySkinTransformer
/// <summary>
/// Not inherit the <see cref="LegacySkinTransformer"/> because:
/// 1. Karaoke ruleset does not have the legacy skin.
/// 2. There's not much logic in the <see cref="LegacySkinTransformer"/>
/// </summary>
public class KaraokeLegacySkinTransformer : KaraokeDefaultSkinTransformer
{
private readonly Lazy<bool> isLegacySkin;
private readonly KaraokeBeatmapSkin karaokeSkin;

public KaraokeLegacySkinTransformer(ISkin source, IBeatmap beatmap)
: base(source)
public KaraokeLegacySkinTransformer(ISkin skin, IBeatmap beatmap)
: base(skin, beatmap)
{
// we should get config by default karaoke skin.
// if has resource or texture, then try to get from legacy skin.
Expand Down

0 comments on commit 431c8a0

Please sign in to comment.