mirror of https://github.com/ppy/osu
Adjust variables slightly for readability
This commit is contained in:
parent
979f7f88a1
commit
cb8ed1f144
|
@ -106,18 +106,23 @@ public void TestCatcherAnimationStateReverted()
|
|||
public void TestCatcherCatchWidth()
|
||||
{
|
||||
float halfWidth = Catcher.CalculateCatchWidth(new BeatmapDifficulty { CircleSize = 0 }) / 2;
|
||||
const float center_x = CatchPlayfield.CENTER_X;
|
||||
AddStep("move catcher to center", () => catcher.X = center_x);
|
||||
|
||||
AddStep("move catcher to center", () => catcher.X = CatchPlayfield.CENTER_X);
|
||||
|
||||
float leftPlateBounds = CatchPlayfield.CENTER_X - halfWidth;
|
||||
float rightPlateBounds = CatchPlayfield.CENTER_X + halfWidth;
|
||||
|
||||
AddStep("catch fruit", () =>
|
||||
{
|
||||
attemptCatch(new Fruit { X = center_x + -halfWidth + 1 });
|
||||
attemptCatch(new Fruit { X = center_x + halfWidth - 1 });
|
||||
attemptCatch(new Fruit { X = leftPlateBounds + 1 });
|
||||
attemptCatch(new Fruit { X = rightPlateBounds - 1 });
|
||||
});
|
||||
checkPlate(2);
|
||||
|
||||
AddStep("miss fruit", () =>
|
||||
{
|
||||
attemptCatch(new Fruit { X = center_x + -halfWidth - 1 });
|
||||
attemptCatch(new Fruit { X = center_x + halfWidth + 1 });
|
||||
attemptCatch(new Fruit { X = leftPlateBounds - 1 });
|
||||
attemptCatch(new Fruit { X = rightPlateBounds + 1 });
|
||||
});
|
||||
checkPlate(2);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue