1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-28 06:42:54 +08:00

Clean up head/tail setting in various DHOs

This commit is contained in:
smoogipoo 2019-10-17 14:02:23 +09:00
parent f429a8f7c2
commit bc41eb176e
2 changed files with 9 additions and 9 deletions

View File

@ -21,13 +21,13 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables
{
public override bool DisplayResult => false;
public DrawableNote Head => headContainer.Child;
public DrawableNote Tail => tailContainer.Child;
private readonly Container<DrawableHeadNote> headContainer;
private readonly Container<DrawableTailNote> tailContainer;
private readonly Container<DrawableHoldNoteTick> tickContainer;
public DrawableNote Head { get; private set; }
public DrawableNote Tail { get; private set; }
private readonly BodyPiece bodyPiece;
/// <summary>
@ -92,7 +92,7 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables
switch (hitObject)
{
case TailNote _:
return Tail = new DrawableTailNote(this)
return new DrawableTailNote(this)
{
Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre,
@ -100,7 +100,7 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables
};
case Note _:
return Head = new DrawableHeadNote(this)
return new DrawableHeadNote(this)
{
Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre,

View File

@ -20,8 +20,8 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
{
public class DrawableSlider : DrawableOsuHitObject, IDrawableHitObjectWithProxiedApproach
{
public DrawableSliderHead HeadCircle { get; private set; }
public DrawableSliderTail TailCircle { get; private set; }
public DrawableSliderHead HeadCircle => headContainer.Child;
public DrawableSliderTail TailCircle => tailContainer.Child;
public readonly SnakingSliderBody Body;
public readonly SliderBall Ball;
@ -100,11 +100,11 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
switch (hitObject)
{
case DrawableSliderHead head:
headContainer.Child = HeadCircle = head;
headContainer.Child = head;
break;
case DrawableSliderTail tail:
tailContainer.Child = TailCircle = tail;
tailContainer.Child = tail;
break;
case DrawableSliderTick tick: