Make ScrollingHitObjectContainer handle nested hitobjects

This commit is contained in:
smoogipoo
2018-01-11 15:08:30 +09:00
parent a6d8b28221
commit 9d00e5bb7d
8 changed files with 59 additions and 70 deletions

View File

@ -7,7 +7,6 @@ using osu.Game.Rulesets.Objects.Drawables;
using osu.Framework.Graphics;
using osu.Game.Rulesets.Mania.Objects.Drawables.Pieces;
using OpenTK.Graphics;
using OpenTK;
using osu.Framework.Graphics.Containers;
using osu.Game.Rulesets.Mania.Judgements;
using osu.Framework.Extensions.IEnumerableExtensions;
@ -59,12 +58,7 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables
Origin = Anchor.TopCentre,
RelativeSizeAxes = Axes.X,
},
tickContainer = new Container<DrawableHoldNoteTick>
{
RelativeSizeAxes = Axes.Both,
RelativeChildOffset = new Vector2(0, (float)HitObject.StartTime),
RelativeChildSize = new Vector2(1, (float)HitObject.Duration)
},
tickContainer = new Container<DrawableHoldNoteTick> { RelativeSizeAxes = Axes.Both },
head = new DrawableHeadNote(this, action)
{
Anchor = Anchor.TopCentre,
@ -72,7 +66,7 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables
},
tail = new DrawableTailNote(this, action)
{
Anchor = Anchor.BottomCentre,
Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre
}
});
@ -174,13 +168,6 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables
{
this.holdNote = holdNote;
RelativePositionAxes = Axes.None;
Y = 0;
// Life time managed by the parent DrawableHoldNote
LifetimeStart = double.MinValue;
LifetimeEnd = double.MaxValue;
GlowPiece.Alpha = 0;
}
@ -213,13 +200,6 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables
{
this.holdNote = holdNote;
RelativePositionAxes = Axes.None;
Y = 0;
// Life time managed by the parent DrawableHoldNote
LifetimeStart = double.MinValue;
LifetimeEnd = double.MaxValue;
GlowPiece.Alpha = 0;
}