mirror of
https://github.com/ppy/osu
synced 2024-12-28 09:52:56 +00:00
Allow FruitOutline
to be used for nested hit objects
This commit is contained in:
parent
0fa7716ced
commit
7833a1b09a
@ -1,6 +1,7 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using JetBrains.Annotations;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
@ -18,7 +19,6 @@ namespace osu.Game.Rulesets.Catch.Edit.Blueprints.Components
|
||||
{
|
||||
Anchor = Anchor.BottomLeft;
|
||||
Origin = Anchor.Centre;
|
||||
Size = new Vector2(2 * CatchHitObject.OBJECT_RADIUS);
|
||||
InternalChild = new BorderPiece();
|
||||
}
|
||||
|
||||
@ -28,10 +28,10 @@ namespace osu.Game.Rulesets.Catch.Edit.Blueprints.Components
|
||||
Colour = osuColour.Yellow;
|
||||
}
|
||||
|
||||
public void UpdateFrom(ScrollingHitObjectContainer hitObjectContainer, CatchHitObject hitObject)
|
||||
public void UpdateFrom(ScrollingHitObjectContainer hitObjectContainer, CatchHitObject hitObject, [CanBeNull] CatchHitObject parent = null)
|
||||
{
|
||||
X = hitObject.EffectiveX;
|
||||
Y = hitObjectContainer.PositionAtTime(hitObject.StartTime);
|
||||
X = hitObject.EffectiveX - (parent?.OriginalX ?? 0);
|
||||
Y = hitObjectContainer.PositionAtTime(hitObject.StartTime, parent?.StartTime ?? hitObjectContainer.Time.Current);
|
||||
Scale = new Vector2(hitObject.Scale);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user