verifyCollision method

bool verifyCollision(
  1. CollisionConfig? other, {
  2. Vector2? displacement,
})

Implementation

bool verifyCollision(CollisionConfig? other, {Vector2? displacement}) {
  if (other == null) return false;
  for (final element1 in collisions) {
    for (final element2 in other.collisions) {
      if (displacement != null
          ? element1.verifyCollisionSimulate(displacement, element2)
          : element1.verifyCollision(element2)) {
        return true;
      }
    }
  }
  return false;
}