mirror of
https://github.com/godotengine/godot.git
synced 2024-11-27 09:16:35 +08:00
Add NavigationServer2D debug functions
Adds debug functions to NavigationServer2D to mirror NavigationServer3D functions for 2D users.
This commit is contained in:
parent
c2eaaef149
commit
d254f0fa5f
@ -158,6 +158,47 @@ void NavigationServer2D::_emit_map_changed(RID p_map) {
|
||||
emit_signal(SNAME("map_changed"), p_map);
|
||||
}
|
||||
|
||||
#ifdef DEBUG_ENABLED
|
||||
void NavigationServer2D::set_debug_enabled(bool p_enabled) {
|
||||
NavigationServer3D::get_singleton_mut()->set_debug_enabled(p_enabled);
|
||||
}
|
||||
bool NavigationServer2D::get_debug_enabled() const {
|
||||
return NavigationServer3D::get_singleton()->get_debug_enabled();
|
||||
}
|
||||
|
||||
void NavigationServer2D::set_debug_navigation_edge_connection_color(const Color &p_color) {
|
||||
NavigationServer3D::get_singleton_mut()->set_debug_navigation_edge_connection_color(p_color);
|
||||
}
|
||||
|
||||
Color NavigationServer2D::get_debug_navigation_edge_connection_color() const {
|
||||
return NavigationServer3D::get_singleton()->get_debug_navigation_edge_connection_color();
|
||||
}
|
||||
|
||||
void NavigationServer2D::set_debug_navigation_geometry_face_color(const Color &p_color) {
|
||||
NavigationServer3D::get_singleton_mut()->set_debug_navigation_geometry_face_color(p_color);
|
||||
}
|
||||
|
||||
Color NavigationServer2D::get_debug_navigation_geometry_face_color() const {
|
||||
return NavigationServer3D::get_singleton()->get_debug_navigation_geometry_face_color();
|
||||
}
|
||||
|
||||
void NavigationServer2D::set_debug_navigation_geometry_face_disabled_color(const Color &p_color) {
|
||||
NavigationServer3D::get_singleton_mut()->set_debug_navigation_geometry_face_disabled_color(p_color);
|
||||
}
|
||||
|
||||
Color NavigationServer2D::get_debug_navigation_geometry_face_disabled_color() const {
|
||||
return NavigationServer3D::get_singleton()->get_debug_navigation_geometry_face_disabled_color();
|
||||
}
|
||||
|
||||
void NavigationServer2D::set_debug_navigation_enable_edge_connections(const bool p_value) {
|
||||
NavigationServer3D::get_singleton_mut()->set_debug_navigation_enable_edge_connections(p_value);
|
||||
}
|
||||
|
||||
bool NavigationServer2D::get_debug_navigation_enable_edge_connections() const {
|
||||
return NavigationServer3D::get_singleton()->get_debug_navigation_enable_edge_connections();
|
||||
}
|
||||
#endif // DEBUG_ENABLED
|
||||
|
||||
void NavigationServer2D::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("get_maps"), &NavigationServer2D::get_maps);
|
||||
|
||||
|
@ -184,6 +184,23 @@ public:
|
||||
|
||||
NavigationServer2D();
|
||||
virtual ~NavigationServer2D();
|
||||
|
||||
#ifdef DEBUG_ENABLED
|
||||
void set_debug_enabled(bool p_enabled);
|
||||
bool get_debug_enabled() const;
|
||||
|
||||
void set_debug_navigation_edge_connection_color(const Color &p_color);
|
||||
Color get_debug_navigation_edge_connection_color() const;
|
||||
|
||||
void set_debug_navigation_geometry_face_color(const Color &p_color);
|
||||
Color get_debug_navigation_geometry_face_color() const;
|
||||
|
||||
void set_debug_navigation_geometry_face_disabled_color(const Color &p_color);
|
||||
Color get_debug_navigation_geometry_face_disabled_color() const;
|
||||
|
||||
void set_debug_navigation_enable_edge_connections(const bool p_value);
|
||||
bool get_debug_navigation_enable_edge_connections() const;
|
||||
#endif // DEBUG_ENABLED
|
||||
};
|
||||
|
||||
#endif // NAVIGATION_SERVER_2D_H
|
||||
|
Loading…
Reference in New Issue
Block a user