isCollision method

List<ObjectCollision> isCollision({
  1. Vector2? displacement,
  2. bool stopSearchOnFirstCollision = true,
})

Implementation

List<ObjectCollision> isCollision({
  Vector2? displacement,
  bool stopSearchOnFirstCollision = true,
}) {
  if (!containCollision()) return [];

  return _verifyWorldCollision(
    displacement: displacement,
    stopSearchOnFirstCollision: stopSearchOnFirstCollision,
  );
}