You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-23 15:16:17 +00:00
Renaming of servers for coherency.
VisualServer -> RenderingServer PhysicsServer -> PhysicsServer3D Physics2DServer -> PhysicsServer2D NavigationServer -> NavigationServer3D Navigation2DServer -> NavigationServer2D Also renamed corresponding files.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user