1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-27 11:42:58 +08:00
osu-lazer/osu.Game.Rulesets.Taiko/Skinning/Argon/TaikoArgonSkinTransformer.cs

79 lines
3.2 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;
using osu.Game.Rulesets.Scoring;
using osu.Game.Skinning;
namespace osu.Game.Rulesets.Taiko.Skinning.Argon
{
public class TaikoArgonSkinTransformer : SkinTransformer
{
public TaikoArgonSkinTransformer(ISkin skin)
: base(skin)
{
}
public override Drawable? GetDrawableComponent(ISkinComponentLookup component)
{
switch (component)
{
case GameplaySkinComponentLookup<HitResult> resultComponent:
// This should eventually be moved to a skin setting, when supported.
if (Skin is ArgonProSkin && resultComponent.Component >= HitResult.Great)
return Drawable.Empty();
return new ArgonJudgementPiece(resultComponent.Component);
2022-11-12 02:05:03 +08:00
case TaikoSkinComponentLookup taikoComponent:
// TODO: Once everything is finalised, consider throwing UnsupportedSkinComponentException on missing entries.
2022-11-12 02:05:03 +08:00
switch (taikoComponent.Component)
{
case TaikoSkinComponents.CentreHit:
2022-11-02 15:52:09 +08:00
return new ArgonCentreCirclePiece();
case TaikoSkinComponents.RimHit:
return new ArgonRimCirclePiece();
case TaikoSkinComponents.PlayfieldBackgroundLeft:
return new ArgonPlayfieldBackgroundLeft();
case TaikoSkinComponents.PlayfieldBackgroundRight:
return new ArgonPlayfieldBackgroundRight();
2022-11-07 12:43:04 +08:00
2022-11-07 16:29:27 +08:00
case TaikoSkinComponents.InputDrum:
return new ArgonInputDrum();
2022-11-07 12:43:04 +08:00
case TaikoSkinComponents.HitTarget:
return new ArgonHitTarget();
2022-11-07 13:01:18 +08:00
case TaikoSkinComponents.BarLine:
return new ArgonBarLine();
2022-11-07 14:07:47 +08:00
case TaikoSkinComponents.DrumRollBody:
return new ArgonElongatedCirclePiece();
2022-11-07 14:39:24 +08:00
case TaikoSkinComponents.DrumRollTick:
return new ArgonTickPiece();
2022-11-07 15:18:03 +08:00
case TaikoSkinComponents.TaikoExplosionKiai:
// the drawable needs to expire as soon as possible to avoid accumulating empty drawables on the playfield.
return Drawable.Empty().With(d => d.Expire());
case TaikoSkinComponents.TaikoExplosionGreat:
case TaikoSkinComponents.TaikoExplosionMiss:
case TaikoSkinComponents.TaikoExplosionOk:
2022-11-12 02:05:03 +08:00
return new ArgonHitExplosion(taikoComponent.Component);
case TaikoSkinComponents.Swell:
return new ArgonSwellCirclePiece();
}
break;
}
return base.GetDrawableComponent(component);
}
}
}