2022-11-02 06:45:32 +00:00
|
|
|
// 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-11-07 07:31:24 +00:00
|
|
|
using osu.Game.Rulesets.Scoring;
|
2022-11-02 06:45:32 +00:00
|
|
|
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(ISkinComponent component)
|
|
|
|
{
|
|
|
|
switch (component)
|
|
|
|
{
|
2022-11-07 07:31:24 +00:00
|
|
|
case GameplaySkinComponent<HitResult> resultComponent:
|
|
|
|
return new ArgonJudgementPiece(resultComponent.Component);
|
|
|
|
|
2022-11-02 06:45:32 +00:00
|
|
|
case TaikoSkinComponent catchComponent:
|
|
|
|
// TODO: Once everything is finalised, consider throwing UnsupportedSkinComponentException on missing entries.
|
|
|
|
switch (catchComponent.Component)
|
|
|
|
{
|
|
|
|
case TaikoSkinComponents.CentreHit:
|
2022-11-02 07:52:09 +00:00
|
|
|
return new ArgonCentreCirclePiece();
|
|
|
|
|
|
|
|
case TaikoSkinComponents.RimHit:
|
|
|
|
return new ArgonRimCirclePiece();
|
2022-11-07 04:16:51 +00:00
|
|
|
|
|
|
|
case TaikoSkinComponents.PlayfieldBackgroundLeft:
|
|
|
|
return new ArgonPlayfieldBackgroundLeft();
|
|
|
|
|
|
|
|
case TaikoSkinComponents.PlayfieldBackgroundRight:
|
|
|
|
return new ArgonPlayfieldBackgroundRight();
|
2022-11-07 04:43:04 +00:00
|
|
|
|
|
|
|
case TaikoSkinComponents.HitTarget:
|
|
|
|
return new ArgonHitTarget();
|
2022-11-07 05:01:18 +00:00
|
|
|
|
|
|
|
case TaikoSkinComponents.BarLine:
|
|
|
|
return new ArgonBarLine();
|
2022-11-07 06:07:47 +00:00
|
|
|
|
|
|
|
case TaikoSkinComponents.DrumRollBody:
|
|
|
|
return new ArgonElongatedCirclePiece();
|
2022-11-07 06:39:24 +00:00
|
|
|
|
|
|
|
case TaikoSkinComponents.DrumRollTick:
|
|
|
|
return new ArgonTickPiece();
|
2022-11-07 07:18:03 +00: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:
|
|
|
|
return new ArgonHitExplosion(catchComponent.Component);
|
2022-11-02 06:45:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return base.GetDrawableComponent(component);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|