aboutsummaryrefslogtreecommitdiff
path: root/scene/2d/parallax_background.cpp
diff options
context:
space:
mode:
authorJuan Linietsky2014-11-05 21:20:42 -0300
committerJuan Linietsky2014-11-05 21:20:42 -0300
commit0dbedd18fc62f700e92a4cf581e505d849bc47ad (patch)
tree8f2c85b4d9227e441fd35ab4873009faa656bcba /scene/2d/parallax_background.cpp
parentd14baf6e41bcdbe4968e0513beccc09dfb160ecd (diff)
downloadgodot-0dbedd18fc62f700e92a4cf581e505d849bc47ad.tar.gz
godot-0dbedd18fc62f700e92a4cf581e505d849bc47ad.tar.zst
godot-0dbedd18fc62f700e92a4cf581e505d849bc47ad.zip
Diffstat (limited to 'scene/2d/parallax_background.cpp')
-rw-r--r--scene/2d/parallax_background.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/scene/2d/parallax_background.cpp b/scene/2d/parallax_background.cpp
index 55607bd4e..df37285f9 100644
--- a/scene/2d/parallax_background.cpp
+++ b/scene/2d/parallax_background.cpp
@@ -36,13 +36,13 @@ void ParallaxBackground::_notification(int p_what) {
switch(p_what) {
- case NOTIFICATION_ENTER_SCENE: {
+ case NOTIFICATION_ENTER_TREE: {
group_name = "__cameras_"+itos(get_viewport().get_id());
add_to_group(group_name);
} break;
- case NOTIFICATION_EXIT_SCENE: {
+ case NOTIFICATION_EXIT_TREE: {
remove_from_group(group_name);
} break;
@@ -78,7 +78,7 @@ void ParallaxBackground::set_scroll_offset(const Point2& p_ofs) {
void ParallaxBackground::_update_scroll() {
- if (!is_inside_scene())
+ if (!is_inside_tree())
return;
Vector2 ofs = base_offset+offset*base_scale;