Update tests to better support stack regeneration cases

This commit is contained in:
Dean Herbert
2021-04-22 16:56:23 +09:00
parent 3e1002fbf3
commit 84a7138223
2 changed files with 30 additions and 10 deletions

View File

@ -53,6 +53,11 @@ namespace osu.Game.Rulesets.Catch.UI
/// </summary>
public const double BASE_SPEED = 1.0;
/// <summary>
/// The amount by which caught fruit should be offset from the plate surface to make them look visually "caught".
/// </summary>
public const float CAUGHT_FRUIT_VERTICAL_OFFSET = -5;
/// <summary>
/// The amount by which caught fruit should be scaled down to fit on the plate.
/// </summary>
@ -492,7 +497,7 @@ namespace osu.Game.Rulesets.Catch.UI
float checkDistance = MathF.Pow(adjustedRadius, 2);
// offset fruit vertically to better place "above" the plate.
position.Y -= 5;
position.Y += CAUGHT_FRUIT_VERTICAL_OFFSET;
while (caughtObjectContainer.Any(f => Vector2Extensions.DistanceSquared(f.Position, position) < checkDistance))
{