Make object on the catcher plate separate CaughtObject class

This commit is contained in:
ekrctb
2020-12-08 20:34:08 +09:00
parent ed50fd445e
commit c301223d8c
10 changed files with 141 additions and 64 deletions

View File

@ -33,6 +33,10 @@ namespace osu.Game.Rulesets.Catch.Skinning
[CanBeNull]
protected DrawableHitObject DrawableHitObject { get; private set; }
[Resolved(canBeNull: true)]
[CanBeNull]
protected CaughtObject CaughtObject { get; private set; }
protected LegacyCatchHitObjectPiece()
{
RelativeSizeAxes = Axes.Both;
@ -73,6 +77,9 @@ namespace osu.Game.Rulesets.Catch.Skinning
HyperDash.BindTo(hitObject.HyperDash);
}
if (CaughtObject != null)
AccentColour.BindTo(CaughtObject.AccentColour);
hyperSprite.Colour = Skin.GetConfig<CatchSkinColour, Color4>(CatchSkinColour.HyperDashFruit)?.Value ??
Skin.GetConfig<CatchSkinColour, Color4>(CatchSkinColour.HyperDash)?.Value ??
Catcher.DEFAULT_HYPER_DASH_COLOUR;