aboutsummaryrefslogtreecommitdiff
path: root/scene/2d/parallax_layer.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_layer.cpp
parentd14baf6e41bcdbe4968e0513beccc09dfb160ecd (diff)
downloadgodot-0dbedd18fc62f700e92a4cf581e505d849bc47ad.tar.gz
godot-0dbedd18fc62f700e92a4cf581e505d849bc47ad.tar.zst
godot-0dbedd18fc62f700e92a4cf581e505d849bc47ad.zip
Diffstat (limited to 'scene/2d/parallax_layer.cpp')
-rw-r--r--scene/2d/parallax_layer.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/scene/2d/parallax_layer.cpp b/scene/2d/parallax_layer.cpp
index 2cda51dcc..a0913ab50 100644
--- a/scene/2d/parallax_layer.cpp
+++ b/scene/2d/parallax_layer.cpp
@@ -74,7 +74,7 @@ void ParallaxLayer::_notification(int p_what) {
switch(p_what) {
- case NOTIFICATION_ENTER_SCENE: {
+ case NOTIFICATION_ENTER_TREE: {
orig_offset=get_pos();
orig_scale=get_scale();
@@ -85,9 +85,9 @@ void ParallaxLayer::_notification(int p_what) {
void ParallaxLayer::set_base_offset_and_scale(const Point2& p_offset,float p_scale) {
- if (!is_inside_scene())
+ if (!is_inside_tree())
return;
- if (get_scene()->is_editor_hint())
+ if (get_tree()->is_editor_hint())
return;
Point2 new_ofs = ((orig_offset+p_offset)*motion_scale)*p_scale;