diff --git a/addons/beehave/libs/windows/beehave.windows.editor.x86_64.dll b/addons/beehave/libs/windows/beehave.windows.editor.x86_64.dll index dc390a6d..519b7320 100644 Binary files a/addons/beehave/libs/windows/beehave.windows.editor.x86_64.dll and b/addons/beehave/libs/windows/beehave.windows.editor.x86_64.dll differ diff --git a/extension/src/beehave_context.cpp b/extension/src/beehave_context.cpp index 59547842..106cecb9 100644 --- a/extension/src/beehave_context.cpp +++ b/extension/src/beehave_context.cpp @@ -33,6 +33,8 @@ using namespace godot; void BeehaveContext::_bind_methods() { + ClassDB::bind_method(D_METHOD("set_tree", "tree"), &BeehaveContext::set_tree); + ClassDB::bind_method(D_METHOD("get_tree"), &BeehaveContext::get_tree); ClassDB::bind_method(D_METHOD("set_blackboard", "blackboard"), &BeehaveContext::set_blackboard); ClassDB::bind_method(D_METHOD("get_blackboard"), &BeehaveContext::get_blackboard); ClassDB::bind_method(D_METHOD("set_actor", "actor"), &BeehaveContext::set_actor); @@ -41,6 +43,16 @@ void BeehaveContext::_bind_methods() ClassDB::bind_method(D_METHOD("get_delta"), &BeehaveContext::get_delta); } +BeehaveTree* BeehaveContext::get_tree() const +{ + return this->tree; +} + +void BeehaveContext::set_tree(BeehaveTree* tree) +{ + this->tree = tree; +} + BeehaveBlackboard* BeehaveContext::get_blackboard() const { return this->blackboard; diff --git a/extension/src/beehave_context.h b/extension/src/beehave_context.h index 4617e582..a8585f3b 100644 --- a/extension/src/beehave_context.h +++ b/extension/src/beehave_context.h @@ -33,6 +33,7 @@ #include #include #include "nodes/beehave_blackboard.h" +#include "nodes/beehave_tree.h" namespace godot { @@ -40,12 +41,16 @@ namespace godot { { GDCLASS(BeehaveContext, RefCounted); + BeehaveTree* tree; BeehaveBlackboard* blackboard; Node* actor; float delta; protected: static void _bind_methods(); public: + BeehaveTree* get_tree() const; + void set_tree(BeehaveTree* tree); + BeehaveBlackboard* get_blackboard() const; void set_blackboard(BeehaveBlackboard* blackboard);