moveDown method
Move player to Down
Implementation
void moveDown(double speed, {VoidCallback? onCollision}) {
double innerSpeed = speed * dtUpdate;
Vector2Rect displacement = position.translate(0, innerSpeed);
if (_isCollision(displacement.position)) {
onCollision?.call();
return;
}
isIdle = false;
position = displacement;
lastDirection = Direction.down;
}