summaryrefslogtreecommitdiff
path: root/scene/2d/collision_shape_2d.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/2d/collision_shape_2d.cpp')
-rw-r--r--scene/2d/collision_shape_2d.cpp14
1 files changed, 4 insertions, 10 deletions
diff --git a/scene/2d/collision_shape_2d.cpp b/scene/2d/collision_shape_2d.cpp
index a0520ca28f..db9a745436 100644
--- a/scene/2d/collision_shape_2d.cpp
+++ b/scene/2d/collision_shape_2d.cpp
@@ -59,34 +59,28 @@ void CollisionShape2D::_notification(int p_what) {
}
_update_in_shape_owner();
}
-
- /*if (Engine::get_singleton()->is_editor_hint()) {
- //display above all else
- set_z_as_relative(false);
- set_z_index(RS::CANVAS_ITEM_Z_MAX - 1);
- }*/
-
} break;
+
case NOTIFICATION_ENTER_TREE: {
if (parent) {
_update_in_shape_owner();
}
-
} break;
+
case NOTIFICATION_LOCAL_TRANSFORM_CHANGED: {
if (parent) {
_update_in_shape_owner(true);
}
-
} break;
+
case NOTIFICATION_UNPARENTED: {
if (parent) {
parent->remove_shape_owner(owner_id);
}
owner_id = 0;
parent = nullptr;
-
} break;
+
case NOTIFICATION_DRAW: {
ERR_FAIL_COND(!is_inside_tree());