1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 09:27:29 +08:00

Merge methods

This commit is contained in:
smoogipoo 2021-06-30 19:52:25 +09:00
parent b94d88be50
commit 2c1f788f2d

View File

@ -139,13 +139,8 @@ namespace osu.Game.Rulesets.Osu.Tests
{
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);