diff options
| author | Juan Linietsky | 2014-11-05 21:20:42 -0300 |
|---|---|---|
| committer | Juan Linietsky | 2014-11-05 21:20:42 -0300 |
| commit | 0dbedd18fc62f700e92a4cf581e505d849bc47ad (patch) | |
| tree | 8f2c85b4d9227e441fd35ab4873009faa656bcba /scene/2d/ray_cast_2d.cpp | |
| parent | d14baf6e41bcdbe4968e0513beccc09dfb160ecd (diff) | |
| download | godot-0dbedd18fc62f700e92a4cf581e505d849bc47ad.tar.gz godot-0dbedd18fc62f700e92a4cf581e505d849bc47ad.tar.zst godot-0dbedd18fc62f700e92a4cf581e505d849bc47ad.zip | |
Diffstat (limited to 'scene/2d/ray_cast_2d.cpp')
| -rw-r--r-- | scene/2d/ray_cast_2d.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/scene/2d/ray_cast_2d.cpp b/scene/2d/ray_cast_2d.cpp index 847933852..e352ac64f 100644 --- a/scene/2d/ray_cast_2d.cpp +++ b/scene/2d/ray_cast_2d.cpp @@ -33,7 +33,7 @@ void RayCast2D::set_cast_to(const Vector2& p_point) { cast_to=p_point; - if (is_inside_scene() && get_scene()->is_editor_hint()) + if (is_inside_tree() && get_tree()->is_editor_hint()) update(); } @@ -82,7 +82,7 @@ Vector2 RayCast2D::get_collision_normal() const{ void RayCast2D::set_enabled(bool p_enabled) { enabled=p_enabled; - if (is_inside_scene() && !get_scene()->is_editor_hint()) + if (is_inside_tree() && !get_tree()->is_editor_hint()) set_fixed_process(p_enabled); if (!p_enabled) collided=false; @@ -101,15 +101,15 @@ void RayCast2D::_notification(int p_what) { switch(p_what) { - case NOTIFICATION_ENTER_SCENE: { + case NOTIFICATION_ENTER_TREE: { - if (enabled && !get_scene()->is_editor_hint()) + if (enabled && !get_tree()->is_editor_hint()) set_fixed_process(true); else set_fixed_process(false); } break; - case NOTIFICATION_EXIT_SCENE: { + case NOTIFICATION_EXIT_TREE: { if (enabled) set_fixed_process(false); @@ -118,7 +118,7 @@ void RayCast2D::_notification(int p_what) { #ifdef TOOLS_ENABLED case NOTIFICATION_DRAW: { - if (!get_scene()->is_editor_hint()) + if (!get_tree()->is_editor_hint()) break; Matrix32 xf; xf.rotate(cast_to.atan2()); |
