mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 00:40:09 +09:00
Split hit explosion positioning from column
This commit is contained in:
@ -3,7 +3,6 @@
|
||||
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Game.Rulesets.Mania.Objects.Drawables.Pieces;
|
||||
using osu.Game.Rulesets.UI;
|
||||
using osu.Game.Rulesets.UI.Scrolling;
|
||||
using osu.Game.Skinning;
|
||||
@ -12,7 +11,7 @@ namespace osu.Game.Rulesets.Mania.UI.Components
|
||||
{
|
||||
public class ColumnHitObjectArea : HitObjectArea
|
||||
{
|
||||
public readonly Container<HitExplosion> Explosions;
|
||||
public readonly Container<Drawable> Explosions;
|
||||
private readonly Drawable hitTarget;
|
||||
|
||||
public ColumnHitObjectArea(HitObjectContainer hitObjectContainer)
|
||||
@ -25,7 +24,7 @@ namespace osu.Game.Rulesets.Mania.UI.Components
|
||||
RelativeSizeAxes = Axes.X,
|
||||
Depth = 1
|
||||
},
|
||||
Explosions = new Container<HitExplosion>
|
||||
Explosions = new Container<Drawable>
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Depth = -1,
|
||||
@ -38,15 +37,9 @@ namespace osu.Game.Rulesets.Mania.UI.Components
|
||||
base.UpdateHitPosition();
|
||||
|
||||
if (Direction.Value == ScrollingDirection.Up)
|
||||
{
|
||||
hitTarget.Anchor = hitTarget.Origin = Anchor.TopLeft;
|
||||
Explosions.Padding = new MarginPadding { Top = DefaultNotePiece.NOTE_HEIGHT / 2 };
|
||||
}
|
||||
else
|
||||
{
|
||||
hitTarget.Anchor = hitTarget.Origin = Anchor.BottomLeft;
|
||||
Explosions.Padding = new MarginPadding { Bottom = DefaultNotePiece.NOTE_HEIGHT / 2 };
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user