diff options
author | Juan Linietsky <reduzio@gmail.com> | 2015-09-18 23:10:58 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2015-09-18 23:10:58 -0300 |
commit | 3f9e5afe68df1e3b4bcf34a21468ed55a57a7973 (patch) | |
tree | b4f5fa413429dc9e9aa50d82a6c47e641f6e433b /scene/main | |
parent | 89a901c4b6a2fe24e781e497ec1a8e8fd69dd59c (diff) |
begin work on debugging collisions....
Diffstat (limited to 'scene/main')
-rw-r--r-- | scene/main/scene_main_loop.cpp | 13 | ||||
-rw-r--r-- | scene/main/scene_main_loop.h | 4 |
2 files changed, 17 insertions, 0 deletions
diff --git a/scene/main/scene_main_loop.cpp b/scene/main/scene_main_loop.cpp index 45e3d92ece..ead729c2bf 100644 --- a/scene/main/scene_main_loop.cpp +++ b/scene/main/scene_main_loop.cpp @@ -471,6 +471,7 @@ void SceneTree::init() { editor_hint=false; + debug_collisions_hint=false; pause=false; root->_set_tree(this); @@ -624,6 +625,16 @@ bool SceneTree::is_editor_hint() const { return editor_hint; } +void SceneTree::set_debug_collisions_hint(bool p_enabled) { + + debug_collisions_hint=p_enabled; +} + +bool SceneTree::is_debugging_collisions_hint() const { + + return debug_collisions_hint; +} + void SceneTree::set_pause(bool p_enabled) { if (p_enabled==pause) @@ -1424,6 +1435,8 @@ void SceneTree::_bind_methods() { ObjectTypeDB::bind_method(_MD("set_editor_hint","enable"),&SceneTree::set_editor_hint); ObjectTypeDB::bind_method(_MD("is_editor_hint"),&SceneTree::is_editor_hint); + ObjectTypeDB::bind_method(_MD("set_debug_collisions_hint","enable"),&SceneTree::set_debug_collisions_hint); + ObjectTypeDB::bind_method(_MD("is_debugging_collisions_hint"),&SceneTree::is_debugging_collisions_hint); #ifdef TOOLS_ENABLED ObjectTypeDB::bind_method(_MD("set_edited_scene_root","scene"),&SceneTree::set_edited_scene_root); ObjectTypeDB::bind_method(_MD("get_edited_scene_root"),&SceneTree::get_edited_scene_root); diff --git a/scene/main/scene_main_loop.h b/scene/main/scene_main_loop.h index 1f09d9c546..b44456bf1d 100644 --- a/scene/main/scene_main_loop.h +++ b/scene/main/scene_main_loop.h @@ -87,6 +87,7 @@ private: uint32_t last_id; bool editor_hint; + bool debug_collisions_hint; bool pause; int root_lock; @@ -270,6 +271,9 @@ public: void set_camera(const RID& p_camera); RID get_camera() const; + void set_debug_collisions_hint(bool p_enabled); + bool is_debugging_collisions_hint() const; + int64_t get_frame() const; int get_node_count() const; |