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

@ -28,7 +28,8 @@ namespace osu.Game.Rulesets.Catch.UI
public const float CENTER_X = WIDTH / 2;
internal readonly CatcherArea CatcherArea;
private readonly CatchComboDisplay comboDisplay;
private CatchComboDisplay comboDisplay => CatcherArea.ComboDisplay;
public override bool ReceivePositionalInputAt(Vector2 screenSpacePos) =>
// only check the X position; handle all vertical space.
@ -49,22 +50,12 @@ namespace osu.Game.Rulesets.Catch.UI
Origin = Anchor.TopLeft,
};
comboDisplay = new CatchComboDisplay
{
RelativeSizeAxes = Axes.None,
AutoSizeAxes = Axes.Both,
Anchor = Anchor.CentreLeft,
Origin = Anchor.Centre,
Y = 30f,
};
InternalChildren = new[]
{
explodingFruitContainer,
CatcherArea.MovableCatcher.CreateProxiedContent(),
HitObjectContainer,
CatcherArea,
comboDisplay,
};
}
@ -81,12 +72,6 @@ namespace osu.Game.Rulesets.Catch.UI
fruit.CheckPosition = CheckIfWeCanCatch;
}
protected override void Update()
{
base.Update();
comboDisplay.X = CatcherArea.MovableCatcher.X;
}
private void onNewResult(DrawableHitObject judgedObject, JudgementResult result)
{
var catchObject = (DrawableCatchHitObject)judgedObject;