mirror of
https://github.com/ppy/osu.git
synced 2024-09-22 09:27:34 +08:00
71 lines
2.4 KiB
C#
71 lines
2.4 KiB
C#
// 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.Audio.Sample;
|
|
using osu.Framework.Bindables;
|
|
using osu.Framework.Graphics;
|
|
using osu.Framework.Graphics.Textures;
|
|
using osu.Game.Audio;
|
|
using osu.Game.Rulesets.Scoring;
|
|
using osu.Game.Skinning;
|
|
|
|
namespace osu.Game.Rulesets.Osu.Skinning.Argon
|
|
{
|
|
public class OsuArgonSkinTransformer : ISkinTransformer
|
|
{
|
|
public ISkin Skin { get; }
|
|
|
|
public OsuArgonSkinTransformer(ISkin skin)
|
|
{
|
|
Skin = skin;
|
|
}
|
|
|
|
public Drawable? GetDrawableComponent(ISkinComponent component)
|
|
{
|
|
switch (component)
|
|
{
|
|
case GameplaySkinComponent<HitResult> resultComponent:
|
|
return new ArgonJudgementPiece(resultComponent.Component);
|
|
|
|
case OsuSkinComponent osuComponent:
|
|
switch (osuComponent.Component)
|
|
{
|
|
case OsuSkinComponents.HitCircle:
|
|
return new ArgonMainCirclePiece(true);
|
|
|
|
case OsuSkinComponents.SliderHeadHitCircle:
|
|
return new ArgonMainCirclePiece(false);
|
|
|
|
case OsuSkinComponents.SliderBody:
|
|
return new ArgonSliderBody();
|
|
|
|
case OsuSkinComponents.SliderBall:
|
|
return new ArgonSliderBall();
|
|
|
|
case OsuSkinComponents.SliderFollowCircle:
|
|
return new ArgonFollowCircle();
|
|
|
|
case OsuSkinComponents.SliderScorePoint:
|
|
return new ArgonSliderScorePoint();
|
|
|
|
case OsuSkinComponents.ReverseArrow:
|
|
return new ArgonReverseArrow();
|
|
}
|
|
|
|
break;
|
|
}
|
|
|
|
return null;
|
|
}
|
|
|
|
public Texture? GetTexture(string componentName, WrapMode wrapModeS, WrapMode wrapModeT) => Skin.GetTexture(componentName, wrapModeS, wrapModeT);
|
|
|
|
public ISample? GetSample(ISampleInfo sampleInfo) => Skin.GetSample(sampleInfo);
|
|
|
|
public IBindable<TValue>? GetConfig<TLookup, TValue>(TLookup lookup) where TLookup : notnull where TValue : notnull
|
|
{
|
|
return null;
|
|
}
|
|
}
|
|
}
|