2022-11-02 14:45:32 +08: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 15:31:24 +08:00
|
|
|
using osu.Game.Rulesets.Scoring;
|
2022-11-02 14:45:32 +08:00
|
|
|
using osu.Game.Skinning;
|
|
|
|
|
|
|
|
namespace osu.Game.Rulesets.Taiko.Skinning.Argon
|
|
|
|
{
|
2024-08-08 15:29:54 +08:00
|
|
|
public class TaikoArgonSkinTransformer : SkinTransformer
|
2022-11-02 14:45:32 +08:00
|
|
|
{
|
|
|
|
public TaikoArgonSkinTransformer(ISkin skin)
|
|
|
|
: base(skin)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2023-12-30 08:47:42 +08:00
|
|
|
public override Drawable? GetDrawableComponent(ISkinComponentLookup lookup)
|
2022-11-02 14:45:32 +08:00
|
|
|
{
|
2023-12-30 08:47:42 +08:00
|
|
|
switch (lookup)
|
2022-11-02 14:45:32 +08:00
|
|
|
{
|
2024-08-22 17:42:38 +08:00
|
|
|
case SkinComponentLookup<HitResult> resultComponent:
|
2022-12-24 03:35:44 +08:00
|
|
|
// This should eventually be moved to a skin setting, when supported.
|
|
|
|
if (Skin is ArgonProSkin && resultComponent.Component >= HitResult.Great)
|
|
|
|
return Drawable.Empty();
|
|
|
|
|
2022-11-07 15:31:24 +08:00
|
|
|
return new ArgonJudgementPiece(resultComponent.Component);
|
|
|
|
|
2022-11-12 02:05:03 +08:00
|
|
|
case TaikoSkinComponentLookup taikoComponent:
|
2022-11-02 14:45:32 +08:00
|
|
|
// TODO: Once everything is finalised, consider throwing UnsupportedSkinComponentException on missing entries.
|
2022-11-12 02:05:03 +08:00
|
|
|
switch (taikoComponent.Component)
|
2022-11-02 14:45:32 +08:00
|
|
|
{
|
|
|
|
case TaikoSkinComponents.CentreHit:
|
2022-11-02 15:52:09 +08:00
|
|
|
return new ArgonCentreCirclePiece();
|
|
|
|
|
|
|
|
case TaikoSkinComponents.RimHit:
|
|
|
|
return new ArgonRimCirclePiece();
|
2022-11-07 12:16:51 +08:00
|
|
|
|
|
|
|
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());
|
|
|
|
|
2023-06-30 14:07:07 +08:00
|
|
|
case TaikoSkinComponents.DrumSamplePlayer:
|
2023-06-30 15:03:11 +08:00
|
|
|
return new ArgonDrumSamplePlayer();
|
2023-06-30 14:07:07 +08:00
|
|
|
|
2022-11-07 15:18:03 +08:00
|
|
|
case TaikoSkinComponents.TaikoExplosionGreat:
|
|
|
|
case TaikoSkinComponents.TaikoExplosionMiss:
|
|
|
|
case TaikoSkinComponents.TaikoExplosionOk:
|
2022-11-12 02:05:03 +08:00
|
|
|
return new ArgonHitExplosion(taikoComponent.Component);
|
2022-11-16 15:13:52 +08:00
|
|
|
|
|
|
|
case TaikoSkinComponents.Swell:
|
|
|
|
return new ArgonSwellCirclePiece();
|
2022-11-02 14:45:32 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2023-12-30 08:47:42 +08:00
|
|
|
return base.GetDrawableComponent(lookup);
|
2022-11-02 14:45:32 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|