Prepare for skinnable versions

This commit is contained in:
Dean Herbert 2020-04-11 13:41:14 +09:00
parent 78db83fd0e
commit 009b138364
4 changed files with 10 additions and 2 deletions

View File

@ -3,6 +3,7 @@
using osu.Framework.Graphics.Containers;
using osu.Game.Rulesets.Taiko.Objects.Drawables.Pieces;
using osu.Game.Skinning;
namespace osu.Game.Rulesets.Taiko.Objects.Drawables
{
@ -15,6 +16,7 @@ public DrawableCentreHit(Hit hit)
{
}
protected override CompositeDrawable CreateMainPiece() => new CentreHitCirclePiece();
protected override CompositeDrawable CreateMainPiece() => new SkinnableDrawable(new TaikoSkinComponent(TaikoSkinComponents.CentreHit),
_ => new CentreHitCirclePiece(), confineMode: ConfineMode.ScaleToFit);
}
}

View File

@ -3,6 +3,7 @@
using osu.Framework.Graphics.Containers;
using osu.Game.Rulesets.Taiko.Objects.Drawables.Pieces;
using osu.Game.Skinning;
namespace osu.Game.Rulesets.Taiko.Objects.Drawables
{
@ -15,6 +16,7 @@ public DrawableRimHit(Hit hit)
{
}
protected override CompositeDrawable CreateMainPiece() => new RimHitCirclePiece();
protected override CompositeDrawable CreateMainPiece() => new SkinnableDrawable(new TaikoSkinComponent(TaikoSkinComponents.RimHit),
_ => new RimHitCirclePiece(), confineMode: ConfineMode.ScaleToFit);
}
}

View File

@ -71,6 +71,8 @@ public bool KiaiMode
public CirclePiece()
{
RelativeSizeAxes = Axes.Both;
EarlyActivationMilliseconds = pre_beat_transition_time;
AddRangeInternal(new Drawable[]

View File

@ -6,5 +6,7 @@ namespace osu.Game.Rulesets.Taiko
public enum TaikoSkinComponents
{
InputDrum,
CentreHit,
RimHit
}
}