summaryrefslogtreecommitdiff
path: root/scene/resources/line_shape_2d.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/resources/line_shape_2d.cpp')
-rw-r--r--scene/resources/line_shape_2d.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/scene/resources/line_shape_2d.cpp b/scene/resources/line_shape_2d.cpp
index 3b30b4528a..a1c1b2f9f4 100644
--- a/scene/resources/line_shape_2d.cpp
+++ b/scene/resources/line_shape_2d.cpp
@@ -30,8 +30,8 @@
#include "line_shape_2d.h"
-#include "servers/physics_2d_server.h"
-#include "servers/visual_server.h"
+#include "servers/physics_server_2d.h"
+#include "servers/rendering_server.h"
bool LineShape2D::_edit_is_selected_on_click(const Point2 &p_point, double p_tolerance) const {
@@ -52,7 +52,7 @@ void LineShape2D::_update_shape() {
Array arr;
arr.push_back(normal);
arr.push_back(d);
- Physics2DServer::get_singleton()->shape_set_data(get_rid(), arr);
+ PhysicsServer2D::get_singleton()->shape_set_data(get_rid(), arr);
emit_changed();
}
@@ -82,9 +82,9 @@ void LineShape2D::draw(const RID &p_to_rid, const Color &p_color) {
Vector2 point = get_d() * get_normal();
Vector2 l1[2] = { point - get_normal().tangent() * 100, point + get_normal().tangent() * 100 };
- VS::get_singleton()->canvas_item_add_line(p_to_rid, l1[0], l1[1], p_color, 3);
+ RS::get_singleton()->canvas_item_add_line(p_to_rid, l1[0], l1[1], p_color, 3);
Vector2 l2[2] = { point, point + get_normal() * 30 };
- VS::get_singleton()->canvas_item_add_line(p_to_rid, l2[0], l2[1], p_color, 3);
+ RS::get_singleton()->canvas_item_add_line(p_to_rid, l2[0], l2[1], p_color, 3);
}
Rect2 LineShape2D::get_rect() const {
@@ -117,7 +117,7 @@ void LineShape2D::_bind_methods() {
}
LineShape2D::LineShape2D() :
- Shape2D(Physics2DServer::get_singleton()->line_shape_create()) {
+ Shape2D(PhysicsServer2D::get_singleton()->line_shape_create()) {
normal = Vector2(0, 1);
d = 0;