You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-06 12:20:30 +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 "segment_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 SegmentShape2D::_edit_is_selected_on_click(const Point2 &p_point, double p_tolerance) const {
|
||||
|
||||
@@ -45,7 +45,7 @@ void SegmentShape2D::_update_shape() {
|
||||
Rect2 r;
|
||||
r.position = a;
|
||||
r.size = b;
|
||||
Physics2DServer::get_singleton()->shape_set_data(get_rid(), r);
|
||||
PhysicsServer2D::get_singleton()->shape_set_data(get_rid(), r);
|
||||
emit_changed();
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ Vector2 SegmentShape2D::get_b() const {
|
||||
|
||||
void SegmentShape2D::draw(const RID &p_to_rid, const Color &p_color) {
|
||||
|
||||
VisualServer::get_singleton()->canvas_item_add_line(p_to_rid, a, b, p_color, 3);
|
||||
RenderingServer::get_singleton()->canvas_item_add_line(p_to_rid, a, b, p_color, 3);
|
||||
}
|
||||
|
||||
Rect2 SegmentShape2D::get_rect() const {
|
||||
@@ -99,7 +99,7 @@ void SegmentShape2D::_bind_methods() {
|
||||
}
|
||||
|
||||
SegmentShape2D::SegmentShape2D() :
|
||||
Shape2D(Physics2DServer::get_singleton()->segment_shape_create()) {
|
||||
Shape2D(PhysicsServer2D::get_singleton()->segment_shape_create()) {
|
||||
|
||||
a = Vector2();
|
||||
b = Vector2(0, 10);
|
||||
@@ -113,14 +113,14 @@ void RayShape2D::_update_shape() {
|
||||
Dictionary d;
|
||||
d["length"] = length;
|
||||
d["slips_on_slope"] = slips_on_slope;
|
||||
Physics2DServer::get_singleton()->shape_set_data(get_rid(), d);
|
||||
PhysicsServer2D::get_singleton()->shape_set_data(get_rid(), d);
|
||||
emit_changed();
|
||||
}
|
||||
|
||||
void RayShape2D::draw(const RID &p_to_rid, const Color &p_color) {
|
||||
|
||||
Vector2 tip = Vector2(0, get_length());
|
||||
VS::get_singleton()->canvas_item_add_line(p_to_rid, Vector2(), tip, p_color, 3);
|
||||
RS::get_singleton()->canvas_item_add_line(p_to_rid, Vector2(), tip, p_color, 3);
|
||||
Vector<Vector2> pts;
|
||||
float tsize = 4;
|
||||
pts.push_back(tip + Vector2(0, tsize));
|
||||
@@ -130,7 +130,7 @@ void RayShape2D::draw(const RID &p_to_rid, const Color &p_color) {
|
||||
for (int i = 0; i < 3; i++)
|
||||
cols.push_back(p_color);
|
||||
|
||||
VS::get_singleton()->canvas_item_add_primitive(p_to_rid, pts, cols, Vector<Point2>(), RID());
|
||||
RS::get_singleton()->canvas_item_add_primitive(p_to_rid, pts, cols, Vector<Point2>(), RID());
|
||||
}
|
||||
|
||||
Rect2 RayShape2D::get_rect() const {
|
||||
@@ -179,7 +179,7 @@ bool RayShape2D::get_slips_on_slope() const {
|
||||
}
|
||||
|
||||
RayShape2D::RayShape2D() :
|
||||
Shape2D(Physics2DServer::get_singleton()->ray_shape_create()) {
|
||||
Shape2D(PhysicsServer2D::get_singleton()->ray_shape_create()) {
|
||||
|
||||
length = 20;
|
||||
slips_on_slope = false;
|
||||
|
||||
Reference in New Issue
Block a user