mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2024-12-22 11:56:49 +01:00
Add init() virtual methods to the navigation servers.
This commit is contained in:
parent
aabd293f3b
commit
45ffb33025
@ -230,7 +230,7 @@ void initialize_navigation_server() {
|
||||
navigation_server = NavigationServerManager::new_default_server();
|
||||
}
|
||||
ERR_FAIL_COND(!navigation_server);
|
||||
//physics_server->init();
|
||||
navigation_server->init();
|
||||
|
||||
/// 2D Navigation server
|
||||
navigation_2d_server = Navigation2DServerManager::new_server(ProjectSettings::get_singleton()->get(Navigation2DServerManager::setting_property_name));
|
||||
@ -239,7 +239,7 @@ void initialize_navigation_server() {
|
||||
navigation_2d_server = Navigation2DServerManager::new_default_server();
|
||||
}
|
||||
ERR_FAIL_COND(!navigation_2d_server);
|
||||
//navigation_2d_server->init();
|
||||
navigation_2d_server->init();
|
||||
}
|
||||
|
||||
void finalize_navigation_server() {
|
||||
|
@ -90,6 +90,9 @@ void Navigation2DServer::_bind_methods() {
|
||||
ADD_SIGNAL(MethodInfo("map_changed", PropertyInfo(Variant::RID, "map")));
|
||||
}
|
||||
|
||||
void Navigation2DServer::init() {
|
||||
}
|
||||
|
||||
Navigation2DServer::Navigation2DServer() {
|
||||
singleton = this;
|
||||
}
|
||||
|
@ -184,6 +184,8 @@ public:
|
||||
/// Destroy the `RID`
|
||||
virtual void free(RID p_object) const = 0;
|
||||
|
||||
virtual void init();
|
||||
|
||||
Navigation2DServer();
|
||||
virtual ~Navigation2DServer();
|
||||
};
|
||||
|
@ -36,6 +36,9 @@
|
||||
|
||||
NavigationServer *NavigationServer::singleton = nullptr;
|
||||
|
||||
void NavigationServer::init() {
|
||||
}
|
||||
|
||||
void NavigationServer::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("get_maps"), &NavigationServer::get_maps);
|
||||
|
||||
|
@ -213,6 +213,8 @@ public:
|
||||
/// Note: This function is not thread safe.
|
||||
virtual void process(real_t delta_time) = 0;
|
||||
|
||||
virtual void init();
|
||||
|
||||
NavigationServer();
|
||||
virtual ~NavigationServer();
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user