|
@@ -168,13 +168,6 @@ void VisibilityEnabler2D::_screen_enter() {
|
|
|
if (enabler[ENABLER_PARENT_PROCESS] && get_parent()) {
|
|
|
get_parent()->set_process(true);
|
|
|
}
|
|
|
- if (enabler[ENABLER_PARENT_VISIBILITY] && get_parent()) {
|
|
|
- CanvasItem *ci = Object::cast_to<CanvasItem>(get_parent());
|
|
|
-
|
|
|
- if (ci) {
|
|
|
- ci->set_visible(true);
|
|
|
- }
|
|
|
- }
|
|
|
|
|
|
visible = true;
|
|
|
}
|
|
@@ -190,13 +183,6 @@ void VisibilityEnabler2D::_screen_exit() {
|
|
|
if (enabler[ENABLER_PARENT_PROCESS] && get_parent()) {
|
|
|
get_parent()->set_process(false);
|
|
|
}
|
|
|
- if (enabler[ENABLER_PARENT_VISIBILITY] && get_parent()) {
|
|
|
- CanvasItem *ci = Object::cast_to<CanvasItem>(get_parent());
|
|
|
-
|
|
|
- if (ci) {
|
|
|
- ci->set_visible(false);
|
|
|
- }
|
|
|
- }
|
|
|
|
|
|
visible = false;
|
|
|
}
|
|
@@ -279,14 +265,6 @@ void VisibilityEnabler2D::_notification(int p_what) {
|
|
|
get_parent()->connect(SceneStringNames::get_singleton()->ready,
|
|
|
get_parent(), "set_process", varray(false), CONNECT_REFERENCE_COUNTED);
|
|
|
}
|
|
|
- if (enabler[ENABLER_PARENT_VISIBILITY] && get_parent()) {
|
|
|
- CanvasItem *ci = Object::cast_to<CanvasItem>(get_parent());
|
|
|
-
|
|
|
- if (ci) {
|
|
|
- ci->connect(SceneStringNames::get_singleton()->ready,
|
|
|
- ci, "set_visible", varray(false), CONNECT_REFERENCE_COUNTED);
|
|
|
- }
|
|
|
- }
|
|
|
}
|
|
|
|
|
|
if (p_what == NOTIFICATION_EXIT_TREE) {
|
|
@@ -377,7 +355,6 @@ void VisibilityEnabler2D::_bind_methods() {
|
|
|
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "pause_animated_sprites"), "set_enabler", "is_enabler_enabled", ENABLER_PAUSE_ANIMATED_SPRITES);
|
|
|
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "process_parent"), "set_enabler", "is_enabler_enabled", ENABLER_PARENT_PROCESS);
|
|
|
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "physics_process_parent"), "set_enabler", "is_enabler_enabled", ENABLER_PARENT_PHYSICS_PROCESS);
|
|
|
- ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "visibility_parent"), "set_enabler", "is_enabler_enabled", ENABLER_PARENT_VISIBILITY);
|
|
|
|
|
|
BIND_ENUM_CONSTANT(ENABLER_PAUSE_ANIMATIONS);
|
|
|
BIND_ENUM_CONSTANT(ENABLER_FREEZE_BODIES);
|
|
@@ -385,7 +362,6 @@ void VisibilityEnabler2D::_bind_methods() {
|
|
|
BIND_ENUM_CONSTANT(ENABLER_PARENT_PROCESS);
|
|
|
BIND_ENUM_CONSTANT(ENABLER_PARENT_PHYSICS_PROCESS);
|
|
|
BIND_ENUM_CONSTANT(ENABLER_PAUSE_ANIMATED_SPRITES);
|
|
|
- BIND_ENUM_CONSTANT(ENABLER_PARENT_VISIBILITY);
|
|
|
BIND_ENUM_CONSTANT(ENABLER_MAX);
|
|
|
}
|
|
|
|