Move singleton management from ProjectSettings to Engine

This commit is contained in:
Leon Krause 2017-11-13 21:46:57 +01:00
parent 3732b2318e
commit 9b7b46143d
25 changed files with 130 additions and 109 deletions

View file

@ -2592,6 +2592,16 @@ bool _Engine::is_in_physics_frame() const {
return Engine::get_singleton()->is_in_physics_frame();
}
bool _Engine::has_singleton(const String &p_name) const {
return Engine::get_singleton()->has_singleton(p_name);
}
Object *_Engine::get_singleton_object(const String &p_name) const {
return Engine::get_singleton()->get_singleton_object(p_name);
}
void _Engine::set_editor_hint(bool p_enabled) {
Engine::get_singleton()->set_editor_hint(p_enabled);
@ -2621,6 +2631,9 @@ void _Engine::_bind_methods() {
ClassDB::bind_method(D_METHOD("is_in_physics_frame"), &_Engine::is_in_physics_frame);
ClassDB::bind_method(D_METHOD("has_singleton", "name"), &_Engine::has_singleton);
ClassDB::bind_method(D_METHOD("get_singleton", "name"), &_Engine::get_singleton_object);
ClassDB::bind_method(D_METHOD("set_editor_hint", "enabled"), &_Engine::set_editor_hint);
ClassDB::bind_method(D_METHOD("is_editor_hint"), &_Engine::is_editor_hint);
}