diff options
| author | Leon Krause | 2017-11-13 21:46:57 +0100 |
|---|---|---|
| committer | Leon Krause | 2017-11-14 15:15:13 +0100 |
| commit | 9b7b46143d2df7d4f2efcb89ceb5034c7a57e79c (patch) | |
| tree | 8ceadc6a5891c5f3205b0e23d5b7dd6ef3d40e1f /core/bind | |
| parent | 3732b2318e8a4942e8202f1797527220a5ae01a0 (diff) | |
| download | godot-9b7b46143d2df7d4f2efcb89ceb5034c7a57e79c.tar.gz godot-9b7b46143d2df7d4f2efcb89ceb5034c7a57e79c.tar.zst godot-9b7b46143d2df7d4f2efcb89ceb5034c7a57e79c.zip | |
Diffstat (limited to 'core/bind')
| -rw-r--r-- | core/bind/core_bind.cpp | 13 | ||||
| -rw-r--r-- | core/bind/core_bind.h | 3 |
2 files changed, 16 insertions, 0 deletions
diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp index c369f4bff..e1adb250e 100644 --- a/core/bind/core_bind.cpp +++ b/core/bind/core_bind.cpp @@ -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); } diff --git a/core/bind/core_bind.h b/core/bind/core_bind.h index bbbb40d92..9be889544 100644 --- a/core/bind/core_bind.h +++ b/core/bind/core_bind.h @@ -670,6 +670,9 @@ public: bool is_in_physics_frame() const; + bool has_singleton(const String &p_name) const; + Object *get_singleton_object(const String &p_name) const; + void set_editor_hint(bool p_enabled); bool is_editor_hint() const; |
