osu/osu.Game.Rulesets.Osu/Skinning/Argon/OsuArgonSkinTransformer.cs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

69 lines
2.4 KiB
C#
Raw Normal View History

// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Graphics;
2022-09-16 10:25:04 +00:00
using osu.Game.Rulesets.Scoring;
using osu.Game.Skinning;
namespace osu.Game.Rulesets.Osu.Skinning.Argon
{
public class OsuArgonSkinTransformer : SkinTransformer
{
public OsuArgonSkinTransformer(ISkin skin)
: base(skin)
{
}
public override Drawable? GetDrawableComponent(ISkinComponent component)
{
2022-09-16 10:25:04 +00:00
switch (component)
{
2022-09-16 10:25:04 +00:00
case GameplaySkinComponent<HitResult> resultComponent:
return new ArgonJudgementPiece(resultComponent.Component);
case OsuSkinComponent osuComponent:
2022-10-04 07:17:38 +00:00
// TODO: Once everything is finalised, consider throwing UnsupportedSkinComponentException on missing entries.
2022-09-16 10:25:04 +00:00
switch (osuComponent.Component)
{
case OsuSkinComponents.HitCircle:
return new ArgonMainCirclePiece(true);
2022-09-16 10:25:04 +00:00
case OsuSkinComponents.SliderHeadHitCircle:
return new ArgonMainCirclePiece(false);
2022-09-19 05:38:21 +00:00
case OsuSkinComponents.SliderBody:
return new ArgonSliderBody();
2022-09-19 05:58:27 +00:00
case OsuSkinComponents.SliderBall:
return new ArgonSliderBall();
2022-09-19 07:07:13 +00:00
case OsuSkinComponents.SliderFollowCircle:
return new ArgonFollowCircle();
2022-09-19 05:58:27 +00:00
case OsuSkinComponents.SliderScorePoint:
return new ArgonSliderScorePoint();
2022-09-19 06:39:08 +00:00
2022-09-22 17:07:40 +00:00
case OsuSkinComponents.SpinnerBody:
return new ArgonSpinner();
2022-09-19 06:39:08 +00:00
case OsuSkinComponents.ReverseArrow:
return new ArgonReverseArrow();
case OsuSkinComponents.FollowPoint:
return new ArgonFollowPoint();
2022-09-22 11:39:46 +00:00
case OsuSkinComponents.Cursor:
return new ArgonCursor();
case OsuSkinComponents.CursorTrail:
return new ArgonCursorTrail();
2022-09-16 10:25:04 +00:00
}
break;
}
return base.GetDrawableComponent(component);
}
}
}