2022-10-24 15:57:45 +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;
|
|
|
|
using osu.Game.Skinning;
|
|
|
|
|
|
|
|
namespace osu.Game.Rulesets.Catch.Skinning.Argon
|
|
|
|
{
|
|
|
|
public class CatchArgonSkinTransformer : SkinTransformer
|
|
|
|
{
|
|
|
|
public CatchArgonSkinTransformer(ISkin skin)
|
|
|
|
: base(skin)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2022-11-09 15:04:56 +08:00
|
|
|
public override Drawable? GetDrawableComponent(ISkinComponentLookup lookup)
|
2022-10-24 15:57:45 +08:00
|
|
|
{
|
2022-11-09 13:11:41 +08:00
|
|
|
switch (lookup)
|
2022-10-24 15:57:45 +08:00
|
|
|
{
|
2022-11-09 15:04:56 +08:00
|
|
|
case CatchSkinComponentLookup catchComponent:
|
2022-10-24 15:57:45 +08:00
|
|
|
// TODO: Once everything is finalised, consider throwing UnsupportedSkinComponentException on missing entries.
|
2022-10-28 09:19:53 +08:00
|
|
|
switch (catchComponent.Component)
|
2022-10-24 15:57:45 +08:00
|
|
|
{
|
2022-10-26 17:20:45 +08:00
|
|
|
case CatchSkinComponents.HitExplosion:
|
|
|
|
return new ArgonHitExplosion();
|
|
|
|
|
2022-10-24 15:57:45 +08:00
|
|
|
case CatchSkinComponents.Catcher:
|
|
|
|
return new ArgonCatcher();
|
2022-10-26 15:08:01 +08:00
|
|
|
|
|
|
|
case CatchSkinComponents.Fruit:
|
|
|
|
return new ArgonFruitPiece();
|
2022-10-26 16:01:58 +08:00
|
|
|
|
|
|
|
case CatchSkinComponents.Banana:
|
|
|
|
return new ArgonBananaPiece();
|
2022-10-26 16:32:26 +08:00
|
|
|
|
|
|
|
case CatchSkinComponents.Droplet:
|
|
|
|
return new ArgonDropletPiece();
|
2022-10-24 15:57:45 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2022-11-09 13:11:41 +08:00
|
|
|
return base.GetDrawableComponent(lookup);
|
2022-10-24 15:57:45 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|