Move osu!catch combo counter display to inside CatcherArea

This commit is contained in:
Salman Ahmed
2020-08-29 23:14:29 +03:00
parent 0e9242ee9a
commit ba8a4eb6f0
2 changed files with 18 additions and 18 deletions

View File

@ -23,6 +23,7 @@ namespace osu.Game.Rulesets.Catch.UI
public Func<CatchHitObject, DrawableHitObject<CatchHitObject>> CreateDrawableRepresentation;
public readonly Catcher MovableCatcher;
internal readonly CatchComboDisplay ComboDisplay;
public Container ExplodingFruitTarget
{
@ -34,7 +35,19 @@ namespace osu.Game.Rulesets.Catch.UI
public CatcherArea(BeatmapDifficulty difficulty = null)
{
Size = new Vector2(CatchPlayfield.WIDTH, CATCHER_SIZE);
Child = MovableCatcher = new Catcher(this, difficulty) { X = CatchPlayfield.CENTER_X };
Children = new Drawable[]
{
ComboDisplay = new CatchComboDisplay
{
RelativeSizeAxes = Axes.None,
AutoSizeAxes = Axes.Both,
Anchor = Anchor.TopLeft,
Origin = Anchor.Centre,
Margin = new MarginPadding { Bottom = 350f },
X = CatchPlayfield.CENTER_X
},
MovableCatcher = new Catcher(this, difficulty) { X = CatchPlayfield.CENTER_X },
};
}
public void OnResult(DrawableCatchHitObject fruit, JudgementResult result)
@ -105,6 +118,8 @@ namespace osu.Game.Rulesets.Catch.UI
if (state?.CatcherX != null)
MovableCatcher.X = state.CatcherX.Value;
ComboDisplay.X = MovableCatcher.X;
}
}
}