overlapComponent method
Implementation
bool overlapComponent(PositionComponent c) {
final left = c.position.x;
final top = c.position.y;
final right = c.position.x + c.size.x;
final bottom = c.position.y + c.size.y;
if (this.right <= left || right <= this.left) {
return false;
}
if (this.bottom <= top || bottom <= this.top) {
return false;
}
return true;
}