|
@@ -188,8 +188,7 @@ void VisibilityEnabler2D::_find_nodes(Node *p_node) {
|
|
bool add = false;
|
|
bool add = false;
|
|
Variant meta;
|
|
Variant meta;
|
|
|
|
|
|
- if (enabler[ENABLER_FREEZE_BODIES]) {
|
|
|
|
-
|
|
|
|
|
|
+ {
|
|
RigidBody2D *rb2d = Object::cast_to<RigidBody2D>(p_node);
|
|
RigidBody2D *rb2d = Object::cast_to<RigidBody2D>(p_node);
|
|
if (rb2d && ((rb2d->get_mode() == RigidBody2D::MODE_CHARACTER || rb2d->get_mode() == RigidBody2D::MODE_RIGID))) {
|
|
if (rb2d && ((rb2d->get_mode() == RigidBody2D::MODE_CHARACTER || rb2d->get_mode() == RigidBody2D::MODE_RIGID))) {
|
|
|
|
|
|
@@ -198,24 +197,21 @@ void VisibilityEnabler2D::_find_nodes(Node *p_node) {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- if (enabler[ENABLER_PAUSE_ANIMATIONS]) {
|
|
|
|
-
|
|
|
|
|
|
+ {
|
|
AnimationPlayer *ap = Object::cast_to<AnimationPlayer>(p_node);
|
|
AnimationPlayer *ap = Object::cast_to<AnimationPlayer>(p_node);
|
|
if (ap) {
|
|
if (ap) {
|
|
add = true;
|
|
add = true;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- if (enabler[ENABLER_PAUSE_ANIMATED_SPRITES]) {
|
|
|
|
-
|
|
|
|
|
|
+ {
|
|
AnimatedSprite *as = Object::cast_to<AnimatedSprite>(p_node);
|
|
AnimatedSprite *as = Object::cast_to<AnimatedSprite>(p_node);
|
|
if (as) {
|
|
if (as) {
|
|
add = true;
|
|
add = true;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- if (enabler[ENABLER_PAUSE_PARTICLES]) {
|
|
|
|
-
|
|
|
|
|
|
+ {
|
|
Particles2D *ps = Object::cast_to<Particles2D>(p_node);
|
|
Particles2D *ps = Object::cast_to<Particles2D>(p_node);
|
|
if (ps) {
|
|
if (ps) {
|
|
add = true;
|
|
add = true;
|
|
@@ -278,7 +274,7 @@ void VisibilityEnabler2D::_change_node_state(Node *p_node, bool p_enabled) {
|
|
|
|
|
|
ERR_FAIL_COND(!nodes.has(p_node));
|
|
ERR_FAIL_COND(!nodes.has(p_node));
|
|
|
|
|
|
- {
|
|
|
|
|
|
+ if (enabler[ENABLER_FREEZE_BODIES]) {
|
|
RigidBody2D *rb = Object::cast_to<RigidBody2D>(p_node);
|
|
RigidBody2D *rb = Object::cast_to<RigidBody2D>(p_node);
|
|
if (rb) {
|
|
if (rb) {
|
|
|
|
|
|
@@ -286,7 +282,7 @@ void VisibilityEnabler2D::_change_node_state(Node *p_node, bool p_enabled) {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- {
|
|
|
|
|
|
+ if (enabler[ENABLER_PAUSE_ANIMATIONS]) {
|
|
AnimationPlayer *ap = Object::cast_to<AnimationPlayer>(p_node);
|
|
AnimationPlayer *ap = Object::cast_to<AnimationPlayer>(p_node);
|
|
|
|
|
|
if (ap) {
|
|
if (ap) {
|
|
@@ -294,7 +290,8 @@ void VisibilityEnabler2D::_change_node_state(Node *p_node, bool p_enabled) {
|
|
ap->set_active(p_enabled);
|
|
ap->set_active(p_enabled);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- {
|
|
|
|
|
|
+
|
|
|
|
+ if (enabler[ENABLER_PAUSE_ANIMATED_SPRITES]) {
|
|
AnimatedSprite *as = Object::cast_to<AnimatedSprite>(p_node);
|
|
AnimatedSprite *as = Object::cast_to<AnimatedSprite>(p_node);
|
|
|
|
|
|
if (as) {
|
|
if (as) {
|
|
@@ -306,7 +303,7 @@ void VisibilityEnabler2D::_change_node_state(Node *p_node, bool p_enabled) {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- {
|
|
|
|
|
|
+ if (enabler[ENABLER_PAUSE_PARTICLES]) {
|
|
Particles2D *ps = Object::cast_to<Particles2D>(p_node);
|
|
Particles2D *ps = Object::cast_to<Particles2D>(p_node);
|
|
|
|
|
|
if (ps) {
|
|
if (ps) {
|