feat: modules moved and engine moved to submodule
This commit is contained in:
parent
dfb5e645cd
commit
c33d2130cc
5136 changed files with 225275 additions and 64485 deletions
|
|
@ -51,7 +51,7 @@ Rect2 OccluderPolygon2D::_edit_get_rect() const {
|
|||
}
|
||||
rect_cache_dirty = false;
|
||||
} else {
|
||||
if (polygon.size() == 0) {
|
||||
if (polygon.is_empty()) {
|
||||
item_rect = Rect2();
|
||||
} else {
|
||||
Vector2 d = Vector2(LINE_GRAB_WIDTH, LINE_GRAB_WIDTH);
|
||||
|
|
@ -74,7 +74,7 @@ bool OccluderPolygon2D::_edit_is_selected_on_click(const Point2 &p_point, double
|
|||
const real_t d = LINE_GRAB_WIDTH / 2 + p_tolerance;
|
||||
const Vector2 *points = polygon.ptr();
|
||||
for (int i = 0; i < polygon.size() - 1; i++) {
|
||||
Vector2 p = Geometry2D::get_closest_point_to_segment(p_point, &points[i]);
|
||||
Vector2 p = Geometry2D::get_closest_point_to_segment(p_point, points[i], points[i + 1]);
|
||||
if (p.distance_to(p_point) <= d) {
|
||||
return true;
|
||||
}
|
||||
|
|
@ -270,7 +270,7 @@ PackedStringArray LightOccluder2D::get_configuration_warnings() const {
|
|||
warnings.push_back(RTR("An occluder polygon must be set (or drawn) for this occluder to take effect."));
|
||||
}
|
||||
|
||||
if (occluder_polygon.is_valid() && occluder_polygon->get_polygon().size() == 0) {
|
||||
if (occluder_polygon.is_valid() && occluder_polygon->get_polygon().is_empty()) {
|
||||
warnings.push_back(RTR("The occluder polygon for this occluder is empty. Please draw a polygon."));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue