1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-28 14:12:55 +08:00

Set depths from playfield add methods instead of DrawableHitObject

This commit is contained in:
smoogipooo 2017-09-13 16:17:01 +09:00
parent 6682c3a736
commit 093d82ac45
6 changed files with 9 additions and 3 deletions

View File

@ -45,6 +45,8 @@ namespace osu.Game.Rulesets.Catch.UI
public override void Add(DrawableHitObject h)
{
h.Depth = (float)h.HitObject.StartTime;
base.Add(h);
var fruit = (DrawableFruit)h;

View File

@ -203,6 +203,8 @@ namespace osu.Game.Rulesets.Mania.UI
/// <param name="hitObject">The DrawableHitObject to add.</param>
public override void Add(DrawableHitObject hitObject)
{
hitObject.Depth = (float)hitObject.HitObject.StartTime;
hitObject.AccentColour = AccentColour;
HitObjects.Add(hitObject);
}

View File

@ -65,7 +65,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
Scale = s.Scale,
ComboColour = s.ComboColour,
Samples = s.Samples,
}) { Depth = 0 },
})
};
components.Add(body);

View File

@ -70,6 +70,8 @@ namespace osu.Game.Rulesets.Osu.UI
public override void Add(DrawableHitObject h)
{
h.Depth = (float)h.HitObject.StartTime;
var c = h as IDrawableHitObjectWithProxiedApproach;
if (c != null)
approachCircles.Add(c.ProxiedLayer.CreateProxy());

View File

@ -205,6 +205,8 @@ namespace osu.Game.Rulesets.Taiko.UI
public override void Add(DrawableHitObject h)
{
h.Depth = (float)h.HitObject.StartTime;
base.Add(h);
var barline = h as DrawableBarLine;

View File

@ -55,8 +55,6 @@ namespace osu.Game.Rulesets.Objects.Drawables
: base(hitObject)
{
HitObject = hitObject;
Depth = (float)hitObject.StartTime;
}
private ArmedState state;