Encapsulate combo display better

This commit is contained in:
Bartłomiej Dach
2020-09-12 22:39:06 +02:00
parent 3db0e7cd75
commit fcf3a1d13c
3 changed files with 12 additions and 16 deletions

View File

@ -29,8 +29,6 @@ namespace osu.Game.Rulesets.Catch.UI
internal readonly CatcherArea CatcherArea;
private CatchComboDisplay comboDisplay => CatcherArea.ComboDisplay;
public override bool ReceivePositionalInputAt(Vector2 screenSpacePos) =>
// only check the X position; handle all vertical space.
base.ReceivePositionalInputAt(new Vector2(screenSpacePos.X, ScreenSpaceDrawQuad.Centre.Y));
@ -73,16 +71,9 @@ namespace osu.Game.Rulesets.Catch.UI
}
private void onNewResult(DrawableHitObject judgedObject, JudgementResult result)
{
var catchObject = (DrawableCatchHitObject)judgedObject;
CatcherArea.OnResult(catchObject, result);
comboDisplay.OnNewResult(catchObject, result);
}
=> CatcherArea.OnNewResult((DrawableCatchHitObject)judgedObject, result);
private void onRevertResult(DrawableHitObject judgedObject, JudgementResult result)
{
comboDisplay.OnRevertResult((DrawableCatchHitObject)judgedObject, result);
}
=> CatcherArea.OnRevertResult((DrawableCatchHitObject)judgedObject, result);
}
}