mirror of
https://github.com/godotengine/godot.git
synced 2024-10-22 21:21:53 +00:00
Update FollowPath2D children of Path2D when a curve_changed event occurs
This commit is contained in:
parent
835808ed8f
commit
1b376b32cd
|
@ -167,17 +167,16 @@ void Path2D::_curve_changed() {
|
|||
return;
|
||||
}
|
||||
|
||||
if (!Engine::get_singleton()->is_editor_hint() && !get_tree()->is_debugging_paths_hint()) {
|
||||
return;
|
||||
}
|
||||
|
||||
queue_redraw();
|
||||
for (int i = 0; i < get_child_count(); i++) {
|
||||
PathFollow2D *follow = Object::cast_to<PathFollow2D>(get_child(i));
|
||||
if (follow) {
|
||||
follow->path_changed();
|
||||
}
|
||||
}
|
||||
|
||||
if (Engine::get_singleton()->is_editor_hint() || get_tree()->is_debugging_paths_hint()) {
|
||||
queue_redraw();
|
||||
}
|
||||
}
|
||||
|
||||
void Path2D::set_curve(const Ref<Curve2D> &p_curve) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user