diff options
Diffstat (limited to 'scene/2d/visibility_notifier_2d.cpp')
-rw-r--r-- | scene/2d/visibility_notifier_2d.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/scene/2d/visibility_notifier_2d.cpp b/scene/2d/visibility_notifier_2d.cpp index 54861bbe89..8fc8b65217 100644 --- a/scene/2d/visibility_notifier_2d.cpp +++ b/scene/2d/visibility_notifier_2d.cpp @@ -3,7 +3,7 @@ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ -/* http://www.godotengine.org */ +/* https://godotengine.org */ /*************************************************************************/ /* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */ /* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */ @@ -184,7 +184,7 @@ void VisibilityEnabler2D::_find_nodes(Node *p_node) { if (enabler[ENABLER_FREEZE_BODIES]) { - RigidBody2D *rb2d = p_node->cast_to<RigidBody2D>(); + RigidBody2D *rb2d = Object::cast_to<RigidBody2D>(p_node); if (rb2d && ((rb2d->get_mode() == RigidBody2D::MODE_CHARACTER || (rb2d->get_mode() == RigidBody2D::MODE_RIGID && !rb2d->is_able_to_sleep())))) { add = true; @@ -194,7 +194,7 @@ void VisibilityEnabler2D::_find_nodes(Node *p_node) { if (enabler[ENABLER_PAUSE_ANIMATIONS]) { - AnimationPlayer *ap = p_node->cast_to<AnimationPlayer>(); + AnimationPlayer *ap = Object::cast_to<AnimationPlayer>(p_node); if (ap) { add = true; } @@ -202,7 +202,7 @@ void VisibilityEnabler2D::_find_nodes(Node *p_node) { if (enabler[ENABLER_PAUSE_ANIMATED_SPRITES]) { - AnimatedSprite *as = p_node->cast_to<AnimatedSprite>(); + AnimatedSprite *as = Object::cast_to<AnimatedSprite>(p_node); if (as) { add = true; } @@ -210,7 +210,7 @@ void VisibilityEnabler2D::_find_nodes(Node *p_node) { if (enabler[ENABLER_PAUSE_PARTICLES]) { - Particles2D *ps = p_node->cast_to<Particles2D>(); + Particles2D *ps = Object::cast_to<Particles2D>(p_node); if (ps) { add = true; } @@ -273,7 +273,7 @@ void VisibilityEnabler2D::_change_node_state(Node *p_node, bool p_enabled) { ERR_FAIL_COND(!nodes.has(p_node)); { - RigidBody2D *rb = p_node->cast_to<RigidBody2D>(); + RigidBody2D *rb = Object::cast_to<RigidBody2D>(p_node); if (rb) { rb->set_sleeping(!p_enabled); @@ -281,7 +281,7 @@ void VisibilityEnabler2D::_change_node_state(Node *p_node, bool p_enabled) { } { - AnimationPlayer *ap = p_node->cast_to<AnimationPlayer>(); + AnimationPlayer *ap = Object::cast_to<AnimationPlayer>(p_node); if (ap) { @@ -289,7 +289,7 @@ void VisibilityEnabler2D::_change_node_state(Node *p_node, bool p_enabled) { } } { - AnimatedSprite *as = p_node->cast_to<AnimatedSprite>(); + AnimatedSprite *as = Object::cast_to<AnimatedSprite>(p_node); if (as) { @@ -301,7 +301,7 @@ void VisibilityEnabler2D::_change_node_state(Node *p_node, bool p_enabled) { } { - Particles2D *ps = p_node->cast_to<Particles2D>(); + Particles2D *ps = Object::cast_to<Particles2D>(p_node); if (ps) { @@ -341,13 +341,13 @@ void VisibilityEnabler2D::_bind_methods() { ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "process_parent"), "set_enabler", "is_enabler_enabled", ENABLER_PARENT_PROCESS); ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "fixed_process_parent"), "set_enabler", "is_enabler_enabled", ENABLER_PARENT_FIXED_PROCESS); - BIND_CONSTANT(ENABLER_FREEZE_BODIES); - BIND_CONSTANT(ENABLER_PAUSE_ANIMATIONS); - BIND_CONSTANT(ENABLER_PAUSE_PARTICLES); - BIND_CONSTANT(ENABLER_PAUSE_ANIMATED_SPRITES); - BIND_CONSTANT(ENABLER_PARENT_PROCESS); - BIND_CONSTANT(ENABLER_PARENT_FIXED_PROCESS); - BIND_CONSTANT(ENABLER_MAX); + BIND_ENUM_CONSTANT(ENABLER_FREEZE_BODIES); + BIND_ENUM_CONSTANT(ENABLER_PAUSE_ANIMATIONS); + BIND_ENUM_CONSTANT(ENABLER_PAUSE_PARTICLES); + BIND_ENUM_CONSTANT(ENABLER_PAUSE_ANIMATED_SPRITES); + BIND_ENUM_CONSTANT(ENABLER_PARENT_PROCESS); + BIND_ENUM_CONSTANT(ENABLER_PARENT_FIXED_PROCESS); + BIND_ENUM_CONSTANT(ENABLER_MAX); } void VisibilityEnabler2D::set_enabler(Enabler p_enabler, bool p_enable) { |