public bool Intersects(CollisionBox target) { if (cb.getBoundingBox().Intersects(target.getBoundingBox())) if (cb.getBoundinType() == target.getBoundinType()) { if (cb.getBoundinType() == boundingType.AABB) return true; else if (cb.getBoundinType() == boundingType.AIDBC) { return Math.Abs(Vector2.Distance(cb.getCenter(), target.getCenter())) <= (cb.getSize().X + target.getSize().X)/2; } } else { } return false; }