mirror of
https://github.com/osukey/osukey.git
synced 2025-05-08 23:27:38 +09:00
Fix StackHeight changes not causing position updates
This commit is contained in:
parent
7809ce9361
commit
1cd11a6e5b
@ -61,6 +61,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
|||||||
Size = circle.DrawSize;
|
Size = circle.DrawSize;
|
||||||
|
|
||||||
HitObject.PositionChanged += _ => Position = HitObject.StackedPosition;
|
HitObject.PositionChanged += _ => Position = HitObject.StackedPosition;
|
||||||
|
HitObject.StackHeightChanged += _ => Position = HitObject.StackedPosition;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override Color4 AccentColour
|
public override Color4 AccentColour
|
||||||
|
@ -16,6 +16,7 @@ namespace osu.Game.Rulesets.Osu.Objects
|
|||||||
public const double OBJECT_RADIUS = 64;
|
public const double OBJECT_RADIUS = 64;
|
||||||
|
|
||||||
public event Action<Vector2> PositionChanged;
|
public event Action<Vector2> PositionChanged;
|
||||||
|
public event Action<int> StackHeightChanged;
|
||||||
|
|
||||||
public double TimePreempt = 600;
|
public double TimePreempt = 600;
|
||||||
public double TimeFadeIn = 400;
|
public double TimeFadeIn = 400;
|
||||||
@ -44,7 +45,20 @@ namespace osu.Game.Rulesets.Osu.Objects
|
|||||||
|
|
||||||
public Vector2 StackedEndPosition => EndPosition + StackOffset;
|
public Vector2 StackedEndPosition => EndPosition + StackOffset;
|
||||||
|
|
||||||
public virtual int StackHeight { get; set; }
|
private int stackHeight;
|
||||||
|
|
||||||
|
public int StackHeight
|
||||||
|
{
|
||||||
|
get => stackHeight;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (stackHeight == value)
|
||||||
|
return;
|
||||||
|
stackHeight = value;
|
||||||
|
|
||||||
|
StackHeightChanged?.Invoke(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public Vector2 StackOffset => new Vector2(StackHeight * Scale * -6.4f);
|
public Vector2 StackOffset => new Vector2(StackHeight * Scale * -6.4f);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user