Merge methods

This commit is contained in:
smoogipoo 2021-06-30 19:52:25 +09:00
parent b94d88be50
commit 2c1f788f2d
1 changed files with 1 additions and 6 deletions

View File

@ -139,13 +139,8 @@ private void retrieveSlider(int index)
{
AddStep("retrieve slider at index", () => slider = (Slider)beatmap.HitObjects[index]);
addSeekStep(() => slider);
retrieveDrawableSlider(() => slider);
}
private void retrieveDrawableSlider(Func<Slider> getSliderFunc)
{
AddUntilStep("retrieve drawable slider", () =>
(drawableSlider = (DrawableSlider)Player.DrawableRuleset.Playfield.AllHitObjects.SingleOrDefault(d => d.HitObject == getSliderFunc())) != null);
(drawableSlider = (DrawableSlider)Player.DrawableRuleset.Playfield.AllHitObjects.SingleOrDefault(d => d.HitObject == slider)) != null);
}
private void addEnsureSnakingInSteps(Func<double> startTime) => addCheckPositionChangeSteps(startTime, getSliderEnd, positionIncreased);