Remove outdated comment and simplify code

This commit is contained in:
ekrctb 2021-07-26 18:18:24 +09:00
parent 9ae3c685db
commit 8045534fa5
1 changed files with 3 additions and 8 deletions

View File

@ -218,14 +218,9 @@ public bool CanCatch(CatchHitObject hitObject)
if (!(hitObject is PalpableCatchHitObject fruit))
return false;
var halfCatchWidth = catchWidth * 0.5f;
// this stuff wil disappear once we move fruit to non-relative coordinate space in the future.
var catchObjectPosition = fruit.EffectiveX;
var catcherPosition = Position.X;
return catchObjectPosition >= catcherPosition - halfCatchWidth &&
catchObjectPosition <= catcherPosition + halfCatchWidth;
float halfCatchWidth = catchWidth * 0.5f;
return fruit.EffectiveX >= X - halfCatchWidth &&
fruit.EffectiveX <= X + halfCatchWidth;
}
public void OnNewResult(DrawableCatchHitObject drawableObject, JudgementResult result)