1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-15 14:37:30 +08:00
osu-lazer/osu.Game.Rulesets.Osu/Skinning/Default/OsuTrianglesSkinTransformer.cs

39 lines
1.2 KiB
C#
Raw Normal View History

2024-01-25 18:14:04 +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.Rulesets.Scoring;
using osu.Game.Skinning;
namespace osu.Game.Rulesets.Osu.Skinning.Default
{
public class OsuTrianglesSkinTransformer : SkinTransformer
{
public OsuTrianglesSkinTransformer(ISkin skin)
: base(skin)
{
}
public override Drawable? GetDrawableComponent(ISkinComponentLookup lookup)
{
switch (lookup)
{
case GameplaySkinComponentLookup<HitResult> resultComponent:
HitResult result = resultComponent.Component;
switch (result)
{
case HitResult.IgnoreMiss:
case HitResult.LargeTickMiss:
// use argon judgement piece for new tick misses because i don't want to design another one for triangles.
return new DefaultJudgementPieceSliderTickMiss(result);
}
break;
}
return base.GetDrawableComponent(lookup);
}
}
}