mirror of
https://github.com/ppy/osu.git
synced 2025-01-30 21:32:57 +08:00
Clean up head/tail setting in various DHOs
This commit is contained in:
parent
f429a8f7c2
commit
bc41eb176e
@ -21,13 +21,13 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables
|
|||||||
{
|
{
|
||||||
public override bool DisplayResult => false;
|
public override bool DisplayResult => false;
|
||||||
|
|
||||||
|
public DrawableNote Head => headContainer.Child;
|
||||||
|
public DrawableNote Tail => tailContainer.Child;
|
||||||
|
|
||||||
private readonly Container<DrawableHeadNote> headContainer;
|
private readonly Container<DrawableHeadNote> headContainer;
|
||||||
private readonly Container<DrawableTailNote> tailContainer;
|
private readonly Container<DrawableTailNote> tailContainer;
|
||||||
private readonly Container<DrawableHoldNoteTick> tickContainer;
|
private readonly Container<DrawableHoldNoteTick> tickContainer;
|
||||||
|
|
||||||
public DrawableNote Head { get; private set; }
|
|
||||||
public DrawableNote Tail { get; private set; }
|
|
||||||
|
|
||||||
private readonly BodyPiece bodyPiece;
|
private readonly BodyPiece bodyPiece;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -92,7 +92,7 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables
|
|||||||
switch (hitObject)
|
switch (hitObject)
|
||||||
{
|
{
|
||||||
case TailNote _:
|
case TailNote _:
|
||||||
return Tail = new DrawableTailNote(this)
|
return new DrawableTailNote(this)
|
||||||
{
|
{
|
||||||
Anchor = Anchor.TopCentre,
|
Anchor = Anchor.TopCentre,
|
||||||
Origin = Anchor.TopCentre,
|
Origin = Anchor.TopCentre,
|
||||||
@ -100,7 +100,7 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables
|
|||||||
};
|
};
|
||||||
|
|
||||||
case Note _:
|
case Note _:
|
||||||
return Head = new DrawableHeadNote(this)
|
return new DrawableHeadNote(this)
|
||||||
{
|
{
|
||||||
Anchor = Anchor.TopCentre,
|
Anchor = Anchor.TopCentre,
|
||||||
Origin = Anchor.TopCentre,
|
Origin = Anchor.TopCentre,
|
||||||
|
@ -20,8 +20,8 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
|||||||
{
|
{
|
||||||
public class DrawableSlider : DrawableOsuHitObject, IDrawableHitObjectWithProxiedApproach
|
public class DrawableSlider : DrawableOsuHitObject, IDrawableHitObjectWithProxiedApproach
|
||||||
{
|
{
|
||||||
public DrawableSliderHead HeadCircle { get; private set; }
|
public DrawableSliderHead HeadCircle => headContainer.Child;
|
||||||
public DrawableSliderTail TailCircle { get; private set; }
|
public DrawableSliderTail TailCircle => tailContainer.Child;
|
||||||
|
|
||||||
public readonly SnakingSliderBody Body;
|
public readonly SnakingSliderBody Body;
|
||||||
public readonly SliderBall Ball;
|
public readonly SliderBall Ball;
|
||||||
@ -100,11 +100,11 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
|||||||
switch (hitObject)
|
switch (hitObject)
|
||||||
{
|
{
|
||||||
case DrawableSliderHead head:
|
case DrawableSliderHead head:
|
||||||
headContainer.Child = HeadCircle = head;
|
headContainer.Child = head;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DrawableSliderTail tail:
|
case DrawableSliderTail tail:
|
||||||
tailContainer.Child = TailCircle = tail;
|
tailContainer.Child = tail;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DrawableSliderTick tick:
|
case DrawableSliderTick tick:
|
||||||
|
Loading…
Reference in New Issue
Block a user