Merge pull request #63 from limbonaut/refactor-ditch-p
Remove "p_" from the argument names in the `ClassDB` bindings
This commit is contained in:
commit
27f3982250
|
@ -101,14 +101,14 @@ void BBParam::_get_property_list(List<PropertyInfo> *p_list) const {
|
|||
}
|
||||
|
||||
void BBParam::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("set_value_source", "p_value_source"), &BBParam::set_value_source);
|
||||
ClassDB::bind_method(D_METHOD("set_value_source", "value_source"), &BBParam::set_value_source);
|
||||
ClassDB::bind_method(D_METHOD("get_value_source"), &BBParam::get_value_source);
|
||||
ClassDB::bind_method(D_METHOD("set_saved_value", "p_value"), &BBParam::set_saved_value);
|
||||
ClassDB::bind_method(D_METHOD("set_saved_value", "value"), &BBParam::set_saved_value);
|
||||
ClassDB::bind_method(D_METHOD("get_saved_value"), &BBParam::get_saved_value);
|
||||
ClassDB::bind_method(D_METHOD("set_variable", "p_variable_name"), &BBParam::set_variable);
|
||||
ClassDB::bind_method(D_METHOD("set_variable", "variable_name"), &BBParam::set_variable);
|
||||
ClassDB::bind_method(D_METHOD("get_variable"), &BBParam::get_variable);
|
||||
ClassDB::bind_method(D_METHOD("get_type"), &BBParam::get_type);
|
||||
ClassDB::bind_method(D_METHOD("get_value", "p_agent", "p_blackboard", "p_default"), &BBParam::get_value, Variant());
|
||||
ClassDB::bind_method(D_METHOD("get_value", "agent", "blackboard", "default"), &BBParam::get_value, Variant());
|
||||
|
||||
ADD_PROPERTY(PropertyInfo(Variant::INT, "value_source", PROPERTY_HINT_ENUM, "Saved Value,Blackboard Var"), "set_value_source", "get_value_source");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "variable", PROPERTY_HINT_NONE, "", 0), "set_variable", "get_variable");
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bb_variant.cpp
|
||||
* =============================================================================
|
||||
* Copyright 2021-2023 Serhii Snitsaruk
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
@ -27,7 +27,7 @@ Variant::Type BBVariant::get_type() const {
|
|||
}
|
||||
|
||||
void BBVariant::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("set_type", "p_type"), &BBVariant::set_type);
|
||||
ClassDB::bind_method(D_METHOD("set_type", "type"), &BBVariant::set_type);
|
||||
|
||||
String vtypes;
|
||||
for (int i = 0; i < Variant::VARIANT_MAX; i++) {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bb_variant.h
|
||||
* =============================================================================
|
||||
* Copyright 2021-2023 Serhii Snitsaruk
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -93,14 +93,14 @@ void Blackboard::prefetch_nodepath_vars(Node *p_node) {
|
|||
}
|
||||
|
||||
void Blackboard::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("get_var", "p_name", "p_default", "p_complain"), &Blackboard::get_var, Variant(), true);
|
||||
ClassDB::bind_method(D_METHOD("set_var", "p_name", "p_value"), &Blackboard::set_var);
|
||||
ClassDB::bind_method(D_METHOD("has_var", "p_name"), &Blackboard::has_var);
|
||||
ClassDB::bind_method(D_METHOD("set_parent", "p_blackboard"), &Blackboard::set_parent);
|
||||
ClassDB::bind_method(D_METHOD("get_var", "var_name", "default", "complain"), &Blackboard::get_var, Variant(), true);
|
||||
ClassDB::bind_method(D_METHOD("set_var", "var_name", "value"), &Blackboard::set_var);
|
||||
ClassDB::bind_method(D_METHOD("has_var", "var_name"), &Blackboard::has_var);
|
||||
ClassDB::bind_method(D_METHOD("set_parent", "blackboard"), &Blackboard::set_parent);
|
||||
ClassDB::bind_method(D_METHOD("get_parent"), &Blackboard::get_parent);
|
||||
ClassDB::bind_method(D_METHOD("erase_var", "p_name"), &Blackboard::erase_var);
|
||||
ClassDB::bind_method(D_METHOD("prefetch_nodepath_vars", "p_node"), &Blackboard::prefetch_nodepath_vars);
|
||||
ClassDB::bind_method(D_METHOD("erase_var", "var_name"), &Blackboard::erase_var);
|
||||
ClassDB::bind_method(D_METHOD("prefetch_nodepath_vars", "node"), &Blackboard::prefetch_nodepath_vars);
|
||||
ClassDB::bind_method(D_METHOD("top"), &Blackboard::top);
|
||||
ClassDB::bind_method(D_METHOD("bind_var_to_property", "p_name", "p_object", "p_property"), &Blackboard::bind_var_to_property);
|
||||
ClassDB::bind_method(D_METHOD("unbind_var", "p_name"), &Blackboard::unbind_var);
|
||||
ClassDB::bind_method(D_METHOD("bind_var_to_property", "var_name", "object", "property"), &Blackboard::bind_var_to_property);
|
||||
ClassDB::bind_method(D_METHOD("unbind_var", "var_name"), &Blackboard::unbind_var);
|
||||
}
|
||||
|
|
|
@ -286,7 +286,7 @@ void BlackboardPlan::populate_blackboard(const Ref<Blackboard> &p_blackboard, bo
|
|||
|
||||
void BlackboardPlan::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("create_blackboard"), &BlackboardPlan::create_blackboard);
|
||||
ClassDB::bind_method(D_METHOD("populate_blackboard", "p_blackboard", "p_overwrite"), &BlackboardPlan::populate_blackboard);
|
||||
ClassDB::bind_method(D_METHOD("populate_blackboard", "blackboard", "overwrite"), &BlackboardPlan::populate_blackboard);
|
||||
}
|
||||
|
||||
BlackboardPlan::BlackboardPlan() {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* behavior_tree.cpp
|
||||
* =============================================================================
|
||||
* Copyright 2021-2023 Serhii Snitsaruk
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
@ -83,15 +83,15 @@ void BehaviorTree::_plan_changed() {
|
|||
}
|
||||
|
||||
void BehaviorTree::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("set_description", "p_value"), &BehaviorTree::set_description);
|
||||
ClassDB::bind_method(D_METHOD("set_description", "description"), &BehaviorTree::set_description);
|
||||
ClassDB::bind_method(D_METHOD("get_description"), &BehaviorTree::get_description);
|
||||
ClassDB::bind_method(D_METHOD("set_blackboard_plan", "p_plan"), &BehaviorTree::set_blackboard_plan);
|
||||
ClassDB::bind_method(D_METHOD("set_blackboard_plan", "plan"), &BehaviorTree::set_blackboard_plan);
|
||||
ClassDB::bind_method(D_METHOD("get_blackboard_plan"), &BehaviorTree::get_blackboard_plan);
|
||||
ClassDB::bind_method(D_METHOD("set_root_task", "p_value"), &BehaviorTree::set_root_task);
|
||||
ClassDB::bind_method(D_METHOD("set_root_task", "task"), &BehaviorTree::set_root_task);
|
||||
ClassDB::bind_method(D_METHOD("get_root_task"), &BehaviorTree::get_root_task);
|
||||
ClassDB::bind_method(D_METHOD("clone"), &BehaviorTree::clone);
|
||||
ClassDB::bind_method(D_METHOD("copy_other", "p_other"), &BehaviorTree::copy_other);
|
||||
ClassDB::bind_method(D_METHOD("instantiate", "p_agent", "p_blackboard"), &BehaviorTree::instantiate);
|
||||
ClassDB::bind_method(D_METHOD("copy_other", "other"), &BehaviorTree::copy_other);
|
||||
ClassDB::bind_method(D_METHOD("instantiate", "agent", "blackboard"), &BehaviorTree::instantiate);
|
||||
|
||||
ADD_PROPERTY(PropertyInfo(Variant::STRING, "description", PROPERTY_HINT_MULTILINE_TEXT), "set_description", "get_description");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "blackboard_plan", PROPERTY_HINT_RESOURCE_TYPE, "BlackboardPlan", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_EDITOR_INSTANTIATE_OBJECT), "set_blackboard_plan", "get_blackboard_plan");
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* behavior_tree.h
|
||||
* =============================================================================
|
||||
* Copyright 2021-2023 Serhii Snitsaruk
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bt_player.cpp
|
||||
* =============================================================================
|
||||
* Copyright 2021-2023 Serhii Snitsaruk
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
@ -223,21 +223,21 @@ void BTPlayer::_notification(int p_notification) {
|
|||
}
|
||||
|
||||
void BTPlayer::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("set_behavior_tree", "p_path"), &BTPlayer::set_behavior_tree);
|
||||
ClassDB::bind_method(D_METHOD("set_behavior_tree", "behavior_tree"), &BTPlayer::set_behavior_tree);
|
||||
ClassDB::bind_method(D_METHOD("get_behavior_tree"), &BTPlayer::get_behavior_tree);
|
||||
ClassDB::bind_method(D_METHOD("set_update_mode", "p_mode"), &BTPlayer::set_update_mode);
|
||||
ClassDB::bind_method(D_METHOD("set_update_mode", "update_mode"), &BTPlayer::set_update_mode);
|
||||
ClassDB::bind_method(D_METHOD("get_update_mode"), &BTPlayer::get_update_mode);
|
||||
ClassDB::bind_method(D_METHOD("set_active", "p_active"), &BTPlayer::set_active);
|
||||
ClassDB::bind_method(D_METHOD("set_active", "active"), &BTPlayer::set_active);
|
||||
ClassDB::bind_method(D_METHOD("get_active"), &BTPlayer::get_active);
|
||||
ClassDB::bind_method(D_METHOD("set_blackboard", "p_blackboard"), &BTPlayer::set_blackboard);
|
||||
ClassDB::bind_method(D_METHOD("set_blackboard", "blackboard"), &BTPlayer::set_blackboard);
|
||||
ClassDB::bind_method(D_METHOD("get_blackboard"), &BTPlayer::get_blackboard);
|
||||
ClassDB::bind_method(D_METHOD("set_prefetch_nodepath_vars", "p_value"), &BTPlayer::set_prefetch_nodepath_vars);
|
||||
ClassDB::bind_method(D_METHOD("set_prefetch_nodepath_vars", "enable"), &BTPlayer::set_prefetch_nodepath_vars);
|
||||
ClassDB::bind_method(D_METHOD("get_prefetch_nodepath_vars"), &BTPlayer::get_prefetch_nodepath_vars);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("set_blackboard_plan", "p_plan"), &BTPlayer::set_blackboard_plan);
|
||||
ClassDB::bind_method(D_METHOD("set_blackboard_plan", "plan"), &BTPlayer::set_blackboard_plan);
|
||||
ClassDB::bind_method(D_METHOD("get_blackboard_plan"), &BTPlayer::get_blackboard_plan);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("update", "p_delta"), &BTPlayer::update);
|
||||
ClassDB::bind_method(D_METHOD("update", "delta"), &BTPlayer::update);
|
||||
ClassDB::bind_method(D_METHOD("restart"), &BTPlayer::restart);
|
||||
ClassDB::bind_method(D_METHOD("get_last_status"), &BTPlayer::get_last_status);
|
||||
|
||||
|
@ -254,11 +254,11 @@ void BTPlayer::_bind_methods() {
|
|||
BIND_ENUM_CONSTANT(PHYSICS);
|
||||
BIND_ENUM_CONSTANT(MANUAL);
|
||||
|
||||
ADD_SIGNAL(MethodInfo("behavior_tree_finished", PropertyInfo(Variant::INT, "p_status")));
|
||||
ADD_SIGNAL(MethodInfo("updated", PropertyInfo(Variant::INT, "p_status")));
|
||||
ADD_SIGNAL(MethodInfo("behavior_tree_finished", PropertyInfo(Variant::INT, "status")));
|
||||
ADD_SIGNAL(MethodInfo("updated", PropertyInfo(Variant::INT, "status")));
|
||||
|
||||
#ifdef DEBUG_ENABLED
|
||||
ClassDB::bind_method(D_METHOD("_set_monitor_performance", "p_value"), &BTPlayer::_set_monitor_performance);
|
||||
ClassDB::bind_method(D_METHOD("_set_monitor_performance", "enable"), &BTPlayer::_set_monitor_performance);
|
||||
ClassDB::bind_method(D_METHOD("_get_monitor_performance"), &BTPlayer::_get_monitor_performance);
|
||||
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "monitor_performance"), "_set_monitor_performance", "_get_monitor_performance");
|
||||
#endif // DEBUG_ENABLED
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bt_player.h
|
||||
* =============================================================================
|
||||
* Copyright 2021-2023 Serhii Snitsaruk
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -101,15 +101,15 @@ void BTState::_notification(int p_notification) {
|
|||
}
|
||||
|
||||
void BTState::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("set_behavior_tree", "p_value"), &BTState::set_behavior_tree);
|
||||
ClassDB::bind_method(D_METHOD("set_behavior_tree", "behavior_tree"), &BTState::set_behavior_tree);
|
||||
ClassDB::bind_method(D_METHOD("get_behavior_tree"), &BTState::get_behavior_tree);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("get_tree_instance"), &BTState::get_tree_instance);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("set_success_event", "p_event_name"), &BTState::set_success_event);
|
||||
ClassDB::bind_method(D_METHOD("set_success_event", "event"), &BTState::set_success_event);
|
||||
ClassDB::bind_method(D_METHOD("get_success_event"), &BTState::get_success_event);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("set_failure_event", "p_event_name"), &BTState::set_failure_event);
|
||||
ClassDB::bind_method(D_METHOD("set_failure_event", "event"), &BTState::set_failure_event);
|
||||
ClassDB::bind_method(D_METHOD("get_failure_event"), &BTState::get_failure_event);
|
||||
|
||||
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "behavior_tree", PROPERTY_HINT_RESOURCE_TYPE, "BehaviorTree"), "set_behavior_tree", "get_behavior_tree");
|
||||
|
|
|
@ -44,7 +44,7 @@ BT::Status BTCheckTrigger::_tick(double p_delta) {
|
|||
}
|
||||
|
||||
void BTCheckTrigger::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("set_variable", "p_variable"), &BTCheckTrigger::set_variable);
|
||||
ClassDB::bind_method(D_METHOD("set_variable", "variable"), &BTCheckTrigger::set_variable);
|
||||
ClassDB::bind_method(D_METHOD("get_variable"), &BTCheckTrigger::get_variable);
|
||||
|
||||
ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "variable"), "set_variable", "get_variable");
|
||||
|
|
|
@ -63,11 +63,11 @@ BT::Status BTCheckVar::_tick(double p_delta) {
|
|||
}
|
||||
|
||||
void BTCheckVar::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("set_variable", "p_variable"), &BTCheckVar::set_variable);
|
||||
ClassDB::bind_method(D_METHOD("set_variable", "variable"), &BTCheckVar::set_variable);
|
||||
ClassDB::bind_method(D_METHOD("get_variable"), &BTCheckVar::get_variable);
|
||||
ClassDB::bind_method(D_METHOD("set_check_type", "p_check_type"), &BTCheckVar::set_check_type);
|
||||
ClassDB::bind_method(D_METHOD("set_check_type", "check_type"), &BTCheckVar::set_check_type);
|
||||
ClassDB::bind_method(D_METHOD("get_check_type"), &BTCheckVar::get_check_type);
|
||||
ClassDB::bind_method(D_METHOD("set_value", "p_value"), &BTCheckVar::set_value);
|
||||
ClassDB::bind_method(D_METHOD("set_value", "value"), &BTCheckVar::set_value);
|
||||
ClassDB::bind_method(D_METHOD("get_value"), &BTCheckVar::get_value);
|
||||
|
||||
ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "variable"), "set_variable", "get_variable");
|
||||
|
|
|
@ -70,12 +70,12 @@ PackedStringArray BTSetVar::get_configuration_warnings() {
|
|||
}
|
||||
|
||||
void BTSetVar::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("set_variable", "p_variable"), &BTSetVar::set_variable);
|
||||
ClassDB::bind_method(D_METHOD("set_variable", "variable"), &BTSetVar::set_variable);
|
||||
ClassDB::bind_method(D_METHOD("get_variable"), &BTSetVar::get_variable);
|
||||
ClassDB::bind_method(D_METHOD("set_value", "p_value"), &BTSetVar::set_value);
|
||||
ClassDB::bind_method(D_METHOD("set_value", "value"), &BTSetVar::set_value);
|
||||
ClassDB::bind_method(D_METHOD("get_value"), &BTSetVar::get_value);
|
||||
ClassDB::bind_method(D_METHOD("get_operation"), &BTSetVar::get_operation);
|
||||
ClassDB::bind_method(D_METHOD("set_operation", "p_operation"), &BTSetVar::set_operation);
|
||||
ClassDB::bind_method(D_METHOD("set_operation", "operation"), &BTSetVar::set_operation);
|
||||
|
||||
ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "variable"), "set_variable", "get_variable");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "value", PROPERTY_HINT_RESOURCE_TYPE, "BBVariant"), "set_value", "get_value");
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bt_task.cpp
|
||||
* =============================================================================
|
||||
* Copyright 2021-2023 Serhii Snitsaruk
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
@ -378,35 +378,35 @@ void BTTask::_bind_methods() {
|
|||
// Public Methods.
|
||||
ClassDB::bind_method(D_METHOD("is_root"), &BTTask::is_root);
|
||||
ClassDB::bind_method(D_METHOD("get_root"), &BTTask::get_root);
|
||||
ClassDB::bind_method(D_METHOD("initialize", "p_agent", "p_blackboard"), &BTTask::initialize);
|
||||
ClassDB::bind_method(D_METHOD("initialize", "agent", "blackboard"), &BTTask::initialize);
|
||||
ClassDB::bind_method(D_METHOD("clone"), &BTTask::clone);
|
||||
ClassDB::bind_method(D_METHOD("execute", "p_delta"), &BTTask::execute);
|
||||
ClassDB::bind_method(D_METHOD("get_child", "p_idx"), &BTTask::get_child);
|
||||
ClassDB::bind_method(D_METHOD("execute", "delta"), &BTTask::execute);
|
||||
ClassDB::bind_method(D_METHOD("get_child", "idx"), &BTTask::get_child);
|
||||
ClassDB::bind_method(D_METHOD("get_child_count"), &BTTask::get_child_count);
|
||||
ClassDB::bind_method(D_METHOD("get_child_count_excluding_comments"), &BTTask::get_child_count_excluding_comments);
|
||||
ClassDB::bind_method(D_METHOD("add_child", "p_child"), &BTTask::add_child);
|
||||
ClassDB::bind_method(D_METHOD("add_child_at_index", "p_child", "p_idx"), &BTTask::add_child_at_index);
|
||||
ClassDB::bind_method(D_METHOD("remove_child", "p_child"), &BTTask::remove_child);
|
||||
ClassDB::bind_method(D_METHOD("remove_child_at_index", "p_idx"), &BTTask::remove_child_at_index);
|
||||
ClassDB::bind_method(D_METHOD("has_child", "p_child"), &BTTask::has_child);
|
||||
ClassDB::bind_method(D_METHOD("is_descendant_of", "p_task"), &BTTask::is_descendant_of);
|
||||
ClassDB::bind_method(D_METHOD("add_child", "task"), &BTTask::add_child);
|
||||
ClassDB::bind_method(D_METHOD("add_child_at_index", "task", "idx"), &BTTask::add_child_at_index);
|
||||
ClassDB::bind_method(D_METHOD("remove_child", "task"), &BTTask::remove_child);
|
||||
ClassDB::bind_method(D_METHOD("remove_child_at_index", "idx"), &BTTask::remove_child_at_index);
|
||||
ClassDB::bind_method(D_METHOD("has_child", "task"), &BTTask::has_child);
|
||||
ClassDB::bind_method(D_METHOD("is_descendant_of", "task"), &BTTask::is_descendant_of);
|
||||
ClassDB::bind_method(D_METHOD("get_index"), &BTTask::get_index);
|
||||
ClassDB::bind_method(D_METHOD("next_sibling"), &BTTask::next_sibling);
|
||||
ClassDB::bind_method(D_METHOD("print_tree", "p_initial_tabs"), &BTTask::print_tree, Variant(0));
|
||||
ClassDB::bind_method(D_METHOD("print_tree", "initial_tabs"), &BTTask::print_tree, Variant(0));
|
||||
ClassDB::bind_method(D_METHOD("get_task_name"), &BTTask::get_task_name);
|
||||
ClassDB::bind_method(D_METHOD("abort"), &BTTask::abort);
|
||||
|
||||
// Properties, setters and getters.
|
||||
ClassDB::bind_method(D_METHOD("get_agent"), &BTTask::get_agent);
|
||||
ClassDB::bind_method(D_METHOD("set_agent", "p_agent"), &BTTask::set_agent);
|
||||
ClassDB::bind_method(D_METHOD("set_agent", "agent"), &BTTask::set_agent);
|
||||
ClassDB::bind_method(D_METHOD("_get_children"), &BTTask::_get_children);
|
||||
ClassDB::bind_method(D_METHOD("_set_children", "p_children"), &BTTask::_set_children);
|
||||
ClassDB::bind_method(D_METHOD("_set_children", "children"), &BTTask::_set_children);
|
||||
ClassDB::bind_method(D_METHOD("get_blackboard"), &BTTask::get_blackboard);
|
||||
ClassDB::bind_method(D_METHOD("get_parent"), &BTTask::get_parent);
|
||||
ClassDB::bind_method(D_METHOD("get_status"), &BTTask::get_status);
|
||||
ClassDB::bind_method(D_METHOD("get_elapsed_time"), &BTTask::get_elapsed_time);
|
||||
ClassDB::bind_method(D_METHOD("get_custom_name"), &BTTask::get_custom_name);
|
||||
ClassDB::bind_method(D_METHOD("set_custom_name", "p_name"), &BTTask::set_custom_name);
|
||||
ClassDB::bind_method(D_METHOD("set_custom_name", "name"), &BTTask::set_custom_name);
|
||||
|
||||
ADD_PROPERTY(PropertyInfo(Variant::STRING, "custom_name"), "set_custom_name", "get_custom_name");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "agent", PROPERTY_HINT_RESOURCE_TYPE, "Node", PROPERTY_USAGE_NONE), "set_agent", "get_agent");
|
||||
|
@ -419,7 +419,7 @@ void BTTask::_bind_methods() {
|
|||
GDVIRTUAL_BIND(_setup);
|
||||
GDVIRTUAL_BIND(_enter);
|
||||
GDVIRTUAL_BIND(_exit);
|
||||
GDVIRTUAL_BIND(_tick, "p_delta");
|
||||
GDVIRTUAL_BIND(_tick, "delta");
|
||||
GDVIRTUAL_BIND(_generate_name);
|
||||
GDVIRTUAL_BIND(_get_configuration_warnings);
|
||||
#elif LIMBOAI_GDEXTENSION
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bt_task.h
|
||||
* =============================================================================
|
||||
* Copyright 2021-2023 Serhii Snitsaruk
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bt_parallel.cpp
|
||||
* =============================================================================
|
||||
* Copyright 2021-2023 Serhii Snitsaruk
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
@ -49,11 +49,11 @@ BT::Status BTParallel::_tick(double p_delta) {
|
|||
|
||||
void BTParallel::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("get_num_successes_required"), &BTParallel::get_num_successes_required);
|
||||
ClassDB::bind_method(D_METHOD("set_num_successes_required", "p_value"), &BTParallel::set_num_successes_required);
|
||||
ClassDB::bind_method(D_METHOD("set_num_successes_required", "value"), &BTParallel::set_num_successes_required);
|
||||
ClassDB::bind_method(D_METHOD("get_num_failures_required"), &BTParallel::get_num_failures_required);
|
||||
ClassDB::bind_method(D_METHOD("set_num_failures_required", "p_value"), &BTParallel::set_num_failures_required);
|
||||
ClassDB::bind_method(D_METHOD("set_num_failures_required", "value"), &BTParallel::set_num_failures_required);
|
||||
ClassDB::bind_method(D_METHOD("get_repeat"), &BTParallel::get_repeat);
|
||||
ClassDB::bind_method(D_METHOD("set_repeat", "p_value"), &BTParallel::set_repeat);
|
||||
ClassDB::bind_method(D_METHOD("set_repeat", "enable"), &BTParallel::set_repeat);
|
||||
|
||||
ADD_PROPERTY(PropertyInfo(Variant::INT, "num_successes_required"), "set_num_successes_required", "get_num_successes_required");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::INT, "num_failures_required"), "set_num_failures_required", "get_num_failures_required");
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bt_parallel.h
|
||||
* =============================================================================
|
||||
* Copyright 2021-2023 Serhii Snitsaruk
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bt_probability_selector.cpp
|
||||
* =============================================================================
|
||||
* Copyright 2021-2023 Serhii Snitsaruk
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
@ -119,14 +119,14 @@ void BTProbabilitySelector::_select_task() {
|
|||
//***** Godot
|
||||
|
||||
void BTProbabilitySelector::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("get_weight", "p_index"), &BTProbabilitySelector::get_weight);
|
||||
ClassDB::bind_method(D_METHOD("set_weight", "p_index", "p_weight"), &BTProbabilitySelector::set_weight);
|
||||
ClassDB::bind_method(D_METHOD("get_weight", "child_idx"), &BTProbabilitySelector::get_weight);
|
||||
ClassDB::bind_method(D_METHOD("set_weight", "child_idx", "weight"), &BTProbabilitySelector::set_weight);
|
||||
ClassDB::bind_method(D_METHOD("get_total_weight"), &BTProbabilitySelector::get_total_weight);
|
||||
ClassDB::bind_method(D_METHOD("get_probability", "p_index"), &BTProbabilitySelector::get_probability);
|
||||
ClassDB::bind_method(D_METHOD("set_probability", "p_index", "p_probability"), &BTProbabilitySelector::set_probability);
|
||||
ClassDB::bind_method(D_METHOD("has_probability", "p_index"), &BTProbabilitySelector::has_probability);
|
||||
ClassDB::bind_method(D_METHOD("get_probability", "child_idx"), &BTProbabilitySelector::get_probability);
|
||||
ClassDB::bind_method(D_METHOD("set_probability", "child_idx", "probability"), &BTProbabilitySelector::set_probability);
|
||||
ClassDB::bind_method(D_METHOD("has_probability", "child_idx"), &BTProbabilitySelector::has_probability);
|
||||
ClassDB::bind_method(D_METHOD("get_abort_on_failure"), &BTProbabilitySelector::get_abort_on_failure);
|
||||
ClassDB::bind_method(D_METHOD("set_abort_on_failure", "p_value"), &BTProbabilitySelector::set_abort_on_failure);
|
||||
ClassDB::bind_method(D_METHOD("set_abort_on_failure", "enable"), &BTProbabilitySelector::set_abort_on_failure);
|
||||
|
||||
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "abort_on_failure"), "set_abort_on_failure", "get_abort_on_failure");
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bt_probability_selector.h
|
||||
* =============================================================================
|
||||
* Copyright 2021-2023 Serhii Snitsaruk
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -93,15 +93,15 @@ void BTCooldown::_on_timeout() {
|
|||
//**** Godot
|
||||
|
||||
void BTCooldown::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("set_duration", "p_value"), &BTCooldown::set_duration);
|
||||
ClassDB::bind_method(D_METHOD("set_duration", "duration"), &BTCooldown::set_duration);
|
||||
ClassDB::bind_method(D_METHOD("get_duration"), &BTCooldown::get_duration);
|
||||
ClassDB::bind_method(D_METHOD("set_process_pause", "p_value"), &BTCooldown::set_process_pause);
|
||||
ClassDB::bind_method(D_METHOD("set_process_pause", "enable"), &BTCooldown::set_process_pause);
|
||||
ClassDB::bind_method(D_METHOD("get_process_pause"), &BTCooldown::get_process_pause);
|
||||
ClassDB::bind_method(D_METHOD("set_start_cooled", "p_value"), &BTCooldown::set_start_cooled);
|
||||
ClassDB::bind_method(D_METHOD("set_start_cooled", "enable"), &BTCooldown::set_start_cooled);
|
||||
ClassDB::bind_method(D_METHOD("get_start_cooled"), &BTCooldown::get_start_cooled);
|
||||
ClassDB::bind_method(D_METHOD("set_trigger_on_failure", "p_value"), &BTCooldown::set_trigger_on_failure);
|
||||
ClassDB::bind_method(D_METHOD("set_trigger_on_failure", "enable"), &BTCooldown::set_trigger_on_failure);
|
||||
ClassDB::bind_method(D_METHOD("get_trigger_on_failure"), &BTCooldown::get_trigger_on_failure);
|
||||
ClassDB::bind_method(D_METHOD("set_cooldown_state_var", "p_value"), &BTCooldown::set_cooldown_state_var);
|
||||
ClassDB::bind_method(D_METHOD("set_cooldown_state_var", "variable"), &BTCooldown::set_cooldown_state_var);
|
||||
ClassDB::bind_method(D_METHOD("get_cooldown_state_var"), &BTCooldown::get_cooldown_state_var);
|
||||
ClassDB::bind_method(D_METHOD("_on_timeout"), &BTCooldown::_on_timeout);
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bt_delay.cpp
|
||||
* =============================================================================
|
||||
* Copyright 2021-2023 Serhii Snitsaruk
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
@ -29,7 +29,7 @@ BT::Status BTDelay::_tick(double p_delta) {
|
|||
}
|
||||
|
||||
void BTDelay::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("set_seconds", "p_value"), &BTDelay::set_seconds);
|
||||
ClassDB::bind_method(D_METHOD("set_seconds", "value"), &BTDelay::set_seconds);
|
||||
ClassDB::bind_method(D_METHOD("get_seconds"), &BTDelay::get_seconds);
|
||||
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "seconds"), "set_seconds", "get_seconds");
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bt_delay.h
|
||||
* =============================================================================
|
||||
* Copyright 2021-2023 Serhii Snitsaruk
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -70,9 +70,9 @@ BT::Status BTForEach::_tick(double p_delta) {
|
|||
//**** Godot
|
||||
|
||||
void BTForEach::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("set_array_var", "p_variable"), &BTForEach::set_array_var);
|
||||
ClassDB::bind_method(D_METHOD("set_array_var", "variable"), &BTForEach::set_array_var);
|
||||
ClassDB::bind_method(D_METHOD("get_array_var"), &BTForEach::get_array_var);
|
||||
ClassDB::bind_method(D_METHOD("set_save_var", "p_variable"), &BTForEach::set_save_var);
|
||||
ClassDB::bind_method(D_METHOD("set_save_var", "variable"), &BTForEach::set_save_var);
|
||||
ClassDB::bind_method(D_METHOD("get_save_var"), &BTForEach::get_save_var);
|
||||
|
||||
ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "array_var"), "set_array_var", "get_array_var");
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bt_new_scope.cpp
|
||||
* =============================================================================
|
||||
* Copyright 2021-2023 Serhii Snitsaruk
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
@ -33,7 +33,7 @@ BT::Status BTNewScope::_tick(double p_delta) {
|
|||
}
|
||||
|
||||
void BTNewScope::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("set_blackboard_plan", "p_plan"), &BTNewScope::set_blackboard_plan);
|
||||
ClassDB::bind_method(D_METHOD("set_blackboard_plan", "plan"), &BTNewScope::set_blackboard_plan);
|
||||
ClassDB::bind_method(D_METHOD("get_blackboard_plan"), &BTNewScope::get_blackboard_plan);
|
||||
|
||||
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "blackboard_plan", PROPERTY_HINT_RESOURCE_TYPE, "BlackboardPlan", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_EDITOR_INSTANTIATE_OBJECT), "set_blackboard_plan", "get_blackboard_plan");
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bt_new_scope.h
|
||||
* =============================================================================
|
||||
* Copyright 2021-2023 Serhii Snitsaruk
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bt_probability.cpp
|
||||
* =============================================================================
|
||||
* Copyright 2021-2023 Serhii Snitsaruk
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
@ -31,7 +31,7 @@ BT::Status BTProbability::_tick(double p_delta) {
|
|||
}
|
||||
|
||||
void BTProbability::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("set_run_chance", "p_value"), &BTProbability::set_run_chance);
|
||||
ClassDB::bind_method(D_METHOD("set_run_chance", "probability"), &BTProbability::set_run_chance);
|
||||
ClassDB::bind_method(D_METHOD("get_run_chance"), &BTProbability::get_run_chance);
|
||||
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "run_chance", PROPERTY_HINT_RANGE, "0.0,1.0"), "set_run_chance", "get_run_chance");
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bt_probability.h
|
||||
* =============================================================================
|
||||
* Copyright 2021-2023 Serhii Snitsaruk
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bt_repeat.cpp
|
||||
* =============================================================================
|
||||
* Copyright 2021-2023 Serhii Snitsaruk
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
@ -61,11 +61,11 @@ void BTRepeat::_get_property_list(List<PropertyInfo> *p_list) const {
|
|||
}
|
||||
|
||||
void BTRepeat::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("set_forever", "p_value"), &BTRepeat::set_forever);
|
||||
ClassDB::bind_method(D_METHOD("set_forever", "value"), &BTRepeat::set_forever);
|
||||
ClassDB::bind_method(D_METHOD("get_forever"), &BTRepeat::get_forever);
|
||||
ClassDB::bind_method(D_METHOD("set_times", "p_value"), &BTRepeat::set_times);
|
||||
ClassDB::bind_method(D_METHOD("set_times", "value"), &BTRepeat::set_times);
|
||||
ClassDB::bind_method(D_METHOD("get_times"), &BTRepeat::get_times);
|
||||
ClassDB::bind_method(D_METHOD("set_abort_on_failure", "p_value"), &BTRepeat::set_abort_on_failure);
|
||||
ClassDB::bind_method(D_METHOD("set_abort_on_failure", "enable"), &BTRepeat::set_abort_on_failure);
|
||||
ClassDB::bind_method(D_METHOD("get_abort_on_failure"), &BTRepeat::get_abort_on_failure);
|
||||
|
||||
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "forever"), "set_forever", "get_forever");
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bt_run_limit.cpp
|
||||
* =============================================================================
|
||||
* Copyright 2021-2023 Serhii Snitsaruk
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
@ -40,9 +40,9 @@ BT::Status BTRunLimit::_tick(double p_delta) {
|
|||
}
|
||||
|
||||
void BTRunLimit::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("set_run_limit", "p_value"), &BTRunLimit::set_run_limit);
|
||||
ClassDB::bind_method(D_METHOD("set_run_limit", "max_runs"), &BTRunLimit::set_run_limit);
|
||||
ClassDB::bind_method(D_METHOD("get_run_limit"), &BTRunLimit::get_run_limit);
|
||||
ClassDB::bind_method(D_METHOD("set_count_policy", "p_policy"), &BTRunLimit::set_count_policy);
|
||||
ClassDB::bind_method(D_METHOD("set_count_policy", "count_policy"), &BTRunLimit::set_count_policy);
|
||||
ClassDB::bind_method(D_METHOD("get_count_policy"), &BTRunLimit::get_count_policy);
|
||||
|
||||
ADD_PROPERTY(PropertyInfo(Variant::INT, "run_limit"), "set_run_limit", "get_run_limit");
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bt_subtree.cpp
|
||||
* =============================================================================
|
||||
* Copyright 2021-2023 Serhii Snitsaruk
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
@ -52,7 +52,7 @@ PackedStringArray BTSubtree::get_configuration_warnings() {
|
|||
}
|
||||
|
||||
void BTSubtree::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("set_subtree", "p_value"), &BTSubtree::set_subtree);
|
||||
ClassDB::bind_method(D_METHOD("set_subtree", "behavior_tree"), &BTSubtree::set_subtree);
|
||||
ClassDB::bind_method(D_METHOD("get_subtree"), &BTSubtree::get_subtree);
|
||||
|
||||
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "subtree", PROPERTY_HINT_RESOURCE_TYPE, "BehaviorTree"), "set_subtree", "get_subtree");
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bt_subtree.h
|
||||
* =============================================================================
|
||||
* Copyright 2021-2023 Serhii Snitsaruk
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bt_time_limit.cpp
|
||||
* =============================================================================
|
||||
* Copyright 2021-2023 Serhii Snitsaruk
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
@ -31,7 +31,7 @@ BT::Status BTTimeLimit::_tick(double p_delta) {
|
|||
}
|
||||
|
||||
void BTTimeLimit::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("set_time_limit", "p_value"), &BTTimeLimit::set_time_limit);
|
||||
ClassDB::bind_method(D_METHOD("set_time_limit", "duration_sec"), &BTTimeLimit::set_time_limit);
|
||||
ClassDB::bind_method(D_METHOD("get_time_limit"), &BTTimeLimit::get_time_limit);
|
||||
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "time_limit"), "set_time_limit", "get_time_limit");
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bt_time_limit.h
|
||||
* =============================================================================
|
||||
* Copyright 2021-2023 Serhii Snitsaruk
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bt_await_animation.cpp
|
||||
* =============================================================================
|
||||
* Copyright 2021-2023 Serhii Snitsaruk
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
@ -86,11 +86,11 @@ BT::Status BTAwaitAnimation::_tick(double p_delta) {
|
|||
//**** Godot
|
||||
|
||||
void BTAwaitAnimation::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("set_animation_player", "p_anim_player"), &BTAwaitAnimation::set_animation_player);
|
||||
ClassDB::bind_method(D_METHOD("set_animation_player", "animation_player"), &BTAwaitAnimation::set_animation_player);
|
||||
ClassDB::bind_method(D_METHOD("get_animation_player"), &BTAwaitAnimation::get_animation_player);
|
||||
ClassDB::bind_method(D_METHOD("set_animation_name", "p_anim_name"), &BTAwaitAnimation::set_animation_name);
|
||||
ClassDB::bind_method(D_METHOD("set_animation_name", "name"), &BTAwaitAnimation::set_animation_name);
|
||||
ClassDB::bind_method(D_METHOD("get_animation_name"), &BTAwaitAnimation::get_animation_name);
|
||||
ClassDB::bind_method(D_METHOD("set_max_time", "p_time_sec"), &BTAwaitAnimation::set_max_time);
|
||||
ClassDB::bind_method(D_METHOD("set_max_time", "time_sec"), &BTAwaitAnimation::set_max_time);
|
||||
ClassDB::bind_method(D_METHOD("get_max_time"), &BTAwaitAnimation::get_max_time);
|
||||
|
||||
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "animation_player", PROPERTY_HINT_RESOURCE_TYPE, "BBNode"), "set_animation_player", "get_animation_player");
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bt_await_animation.h
|
||||
* =============================================================================
|
||||
* Copyright 2021-2023 Serhii Snitsaruk
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bt_check_agent_property.cpp
|
||||
* =============================================================================
|
||||
* Copyright 2021-2023 Serhii Snitsaruk
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
@ -68,11 +68,11 @@ BT::Status BTCheckAgentProperty::_tick(double p_delta) {
|
|||
}
|
||||
|
||||
void BTCheckAgentProperty::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("set_property", "p_property"), &BTCheckAgentProperty::set_property);
|
||||
ClassDB::bind_method(D_METHOD("set_property", "property"), &BTCheckAgentProperty::set_property);
|
||||
ClassDB::bind_method(D_METHOD("get_property"), &BTCheckAgentProperty::get_property);
|
||||
ClassDB::bind_method(D_METHOD("set_check_type", "p_check_type"), &BTCheckAgentProperty::set_check_type);
|
||||
ClassDB::bind_method(D_METHOD("set_check_type", "check_type"), &BTCheckAgentProperty::set_check_type);
|
||||
ClassDB::bind_method(D_METHOD("get_check_type"), &BTCheckAgentProperty::get_check_type);
|
||||
ClassDB::bind_method(D_METHOD("set_value", "p_value"), &BTCheckAgentProperty::set_value);
|
||||
ClassDB::bind_method(D_METHOD("set_value", "value"), &BTCheckAgentProperty::set_value);
|
||||
ClassDB::bind_method(D_METHOD("get_value"), &BTCheckAgentProperty::get_value);
|
||||
|
||||
ADD_PROPERTY(PropertyInfo(Variant::STRING, "property"), "set_property", "get_property");
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bt_check_agent_property.h
|
||||
* =============================================================================
|
||||
* Copyright 2021-2023 Serhii Snitsaruk
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bt_pause_animation.cpp
|
||||
* =============================================================================
|
||||
* Copyright 2021-2023 Serhii Snitsaruk
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
@ -58,7 +58,7 @@ BT::Status BTPauseAnimation::_tick(double p_delta) {
|
|||
//**** Godot
|
||||
|
||||
void BTPauseAnimation::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("set_animation_player", "p_anim_player"), &BTPauseAnimation::set_animation_player);
|
||||
ClassDB::bind_method(D_METHOD("set_animation_player", "animation_player"), &BTPauseAnimation::set_animation_player);
|
||||
ClassDB::bind_method(D_METHOD("get_animation_player"), &BTPauseAnimation::get_animation_player);
|
||||
|
||||
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "animation_player", PROPERTY_HINT_RESOURCE_TYPE, "BBNode"), "set_animation_player", "get_animation_player");
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bt_pause_animation.h
|
||||
* =============================================================================
|
||||
* Copyright 2021-2023 Serhii Snitsaruk
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bt_play_animation.cpp
|
||||
* =============================================================================
|
||||
* Copyright 2021-2023 Serhii Snitsaruk
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
@ -109,17 +109,17 @@ BT::Status BTPlayAnimation::_tick(double p_delta) {
|
|||
//**** Godot
|
||||
|
||||
void BTPlayAnimation::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("set_animation_player", "p_anim_player"), &BTPlayAnimation::set_animation_player);
|
||||
ClassDB::bind_method(D_METHOD("set_animation_player", "animation_player"), &BTPlayAnimation::set_animation_player);
|
||||
ClassDB::bind_method(D_METHOD("get_animation_player"), &BTPlayAnimation::get_animation_player);
|
||||
ClassDB::bind_method(D_METHOD("set_animation_name", "p_anim_name"), &BTPlayAnimation::set_animation_name);
|
||||
ClassDB::bind_method(D_METHOD("set_animation_name", "name"), &BTPlayAnimation::set_animation_name);
|
||||
ClassDB::bind_method(D_METHOD("get_animation_name"), &BTPlayAnimation::get_animation_name);
|
||||
ClassDB::bind_method(D_METHOD("set_await_completion", "p_time_sec"), &BTPlayAnimation::set_await_completion);
|
||||
ClassDB::bind_method(D_METHOD("set_await_completion", "time_sec"), &BTPlayAnimation::set_await_completion);
|
||||
ClassDB::bind_method(D_METHOD("get_await_completion"), &BTPlayAnimation::get_await_completion);
|
||||
ClassDB::bind_method(D_METHOD("set_blend", "p_blend"), &BTPlayAnimation::set_blend);
|
||||
ClassDB::bind_method(D_METHOD("set_blend", "blend"), &BTPlayAnimation::set_blend);
|
||||
ClassDB::bind_method(D_METHOD("get_blend"), &BTPlayAnimation::get_blend);
|
||||
ClassDB::bind_method(D_METHOD("set_speed", "p_speed"), &BTPlayAnimation::set_speed);
|
||||
ClassDB::bind_method(D_METHOD("set_speed", "speed"), &BTPlayAnimation::set_speed);
|
||||
ClassDB::bind_method(D_METHOD("get_speed"), &BTPlayAnimation::get_speed);
|
||||
ClassDB::bind_method(D_METHOD("set_from_end", "p_from_end"), &BTPlayAnimation::set_from_end);
|
||||
ClassDB::bind_method(D_METHOD("set_from_end", "from_end"), &BTPlayAnimation::set_from_end);
|
||||
ClassDB::bind_method(D_METHOD("get_from_end"), &BTPlayAnimation::get_from_end);
|
||||
|
||||
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "await_completion", PROPERTY_HINT_RANGE, "0.0,100.0"), "set_await_completion", "get_await_completion");
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bt_play_animation.h
|
||||
* =============================================================================
|
||||
* Copyright 2021-2023 Serhii Snitsaruk
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bt_set_agent_property.cpp
|
||||
* =============================================================================
|
||||
* Copyright 2021-2023 Serhii Snitsaruk
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
@ -81,11 +81,11 @@ BT::Status BTSetAgentProperty::_tick(double p_delta) {
|
|||
}
|
||||
|
||||
void BTSetAgentProperty::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("set_property", "p_property"), &BTSetAgentProperty::set_property);
|
||||
ClassDB::bind_method(D_METHOD("set_property", "property"), &BTSetAgentProperty::set_property);
|
||||
ClassDB::bind_method(D_METHOD("get_property"), &BTSetAgentProperty::get_property);
|
||||
ClassDB::bind_method(D_METHOD("set_value", "p_value"), &BTSetAgentProperty::set_value);
|
||||
ClassDB::bind_method(D_METHOD("set_value", "value"), &BTSetAgentProperty::set_value);
|
||||
ClassDB::bind_method(D_METHOD("get_value"), &BTSetAgentProperty::get_value);
|
||||
ClassDB::bind_method(D_METHOD("set_operation", "p_operation"), &BTSetAgentProperty::set_operation);
|
||||
ClassDB::bind_method(D_METHOD("set_operation", "operation"), &BTSetAgentProperty::set_operation);
|
||||
ClassDB::bind_method(D_METHOD("get_operation"), &BTSetAgentProperty::get_operation);
|
||||
|
||||
ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "property"), "set_property", "get_property");
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bt_set_agent_property.h
|
||||
* =============================================================================
|
||||
* Copyright 2021-2023 Serhii Snitsaruk
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bt_stop_animation.cpp
|
||||
* =============================================================================
|
||||
* Copyright 2021-2023 Serhii Snitsaruk
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
@ -75,11 +75,11 @@ BT::Status BTStopAnimation::_tick(double p_delta) {
|
|||
//**** Godot
|
||||
|
||||
void BTStopAnimation::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("set_animation_player", "p_anim_player"), &BTStopAnimation::set_animation_player);
|
||||
ClassDB::bind_method(D_METHOD("set_animation_player", "animation_player"), &BTStopAnimation::set_animation_player);
|
||||
ClassDB::bind_method(D_METHOD("get_animation_player"), &BTStopAnimation::get_animation_player);
|
||||
ClassDB::bind_method(D_METHOD("set_animation_name", "p_anim_name"), &BTStopAnimation::set_animation_name);
|
||||
ClassDB::bind_method(D_METHOD("set_animation_name", "name"), &BTStopAnimation::set_animation_name);
|
||||
ClassDB::bind_method(D_METHOD("get_animation_name"), &BTStopAnimation::get_animation_name);
|
||||
ClassDB::bind_method(D_METHOD("set_keep_state", "p_keep_state"), &BTStopAnimation::set_keep_state);
|
||||
ClassDB::bind_method(D_METHOD("set_keep_state", "keep_state"), &BTStopAnimation::set_keep_state);
|
||||
ClassDB::bind_method(D_METHOD("get_keep_state"), &BTStopAnimation::get_keep_state);
|
||||
|
||||
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "animation_player", PROPERTY_HINT_RESOURCE_TYPE, "BBNode"), "set_animation_player", "get_animation_player");
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bt_stop_animation.h
|
||||
* =============================================================================
|
||||
* Copyright 2021-2023 Serhii Snitsaruk
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -134,15 +134,15 @@ BT::Status BTCallMethod::_tick(double p_delta) {
|
|||
//**** Godot
|
||||
|
||||
void BTCallMethod::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("set_method", "p_method"), &BTCallMethod::set_method);
|
||||
ClassDB::bind_method(D_METHOD("set_method", "method_name"), &BTCallMethod::set_method);
|
||||
ClassDB::bind_method(D_METHOD("get_method"), &BTCallMethod::get_method);
|
||||
ClassDB::bind_method(D_METHOD("set_node_param", "p_param"), &BTCallMethod::set_node_param);
|
||||
ClassDB::bind_method(D_METHOD("set_node_param", "param"), &BTCallMethod::set_node_param);
|
||||
ClassDB::bind_method(D_METHOD("get_node_param"), &BTCallMethod::get_node_param);
|
||||
ClassDB::bind_method(D_METHOD("set_args", "p_args"), &BTCallMethod::set_args);
|
||||
ClassDB::bind_method(D_METHOD("set_args", "args"), &BTCallMethod::set_args);
|
||||
ClassDB::bind_method(D_METHOD("get_args"), &BTCallMethod::get_args);
|
||||
ClassDB::bind_method(D_METHOD("set_include_delta", "p_include_delta"), &BTCallMethod::set_include_delta);
|
||||
ClassDB::bind_method(D_METHOD("set_include_delta", "include_delta"), &BTCallMethod::set_include_delta);
|
||||
ClassDB::bind_method(D_METHOD("is_delta_included"), &BTCallMethod::is_delta_included);
|
||||
ClassDB::bind_method(D_METHOD("set_result_var", "p_result_var"), &BTCallMethod::set_result_var);
|
||||
ClassDB::bind_method(D_METHOD("set_result_var", "variable"), &BTCallMethod::set_result_var);
|
||||
ClassDB::bind_method(D_METHOD("get_result_var"), &BTCallMethod::get_result_var);
|
||||
|
||||
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "node", PROPERTY_HINT_RESOURCE_TYPE, "BBNode"), "set_node_param", "get_node_param");
|
||||
|
@ -151,8 +151,6 @@ void BTCallMethod::_bind_methods() {
|
|||
ADD_GROUP("Arguments", "args_");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "args_include_delta"), "set_include_delta", "is_delta_included");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "args", PROPERTY_HINT_ARRAY_TYPE, RESOURCE_TYPE_HINT("BBVariant")), "set_args", "get_args");
|
||||
|
||||
// ADD_PROPERTY_DEFAULT("args_include_delta", false);
|
||||
}
|
||||
|
||||
BTCallMethod::BTCallMethod() {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bt_console_print.cpp
|
||||
* =============================================================================
|
||||
* Copyright 2021-2023 Serhii Snitsaruk
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
@ -72,9 +72,9 @@ PackedStringArray BTConsolePrint::get_configuration_warnings() {
|
|||
}
|
||||
|
||||
void BTConsolePrint::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("set_text", "p_text"), &BTConsolePrint::set_text);
|
||||
ClassDB::bind_method(D_METHOD("set_text", "text"), &BTConsolePrint::set_text);
|
||||
ClassDB::bind_method(D_METHOD("get_text"), &BTConsolePrint::get_text);
|
||||
ClassDB::bind_method(D_METHOD("set_bb_format_parameters", "p_variables"), &BTConsolePrint::set_bb_format_parameters);
|
||||
ClassDB::bind_method(D_METHOD("set_bb_format_parameters", "params"), &BTConsolePrint::set_bb_format_parameters);
|
||||
ClassDB::bind_method(D_METHOD("get_bb_format_parameters"), &BTConsolePrint::get_bb_format_parameters);
|
||||
|
||||
ADD_PROPERTY(PropertyInfo(Variant::STRING, "text", PROPERTY_HINT_MULTILINE_TEXT), "set_text", "get_text");
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bt_console_print.h
|
||||
* =============================================================================
|
||||
* Copyright 2021-2023 Serhii Snitsaruk
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -133,17 +133,17 @@ BT::Status BTEvaluateExpression::_tick(double p_delta) {
|
|||
|
||||
void BTEvaluateExpression::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("parse"), &BTEvaluateExpression::parse);
|
||||
ClassDB::bind_method(D_METHOD("set_expression_string", "p_method"), &BTEvaluateExpression::set_expression_string);
|
||||
ClassDB::bind_method(D_METHOD("set_expression_string", "expression_string"), &BTEvaluateExpression::set_expression_string);
|
||||
ClassDB::bind_method(D_METHOD("get_expression_string"), &BTEvaluateExpression::get_expression_string);
|
||||
ClassDB::bind_method(D_METHOD("set_node_param", "p_param"), &BTEvaluateExpression::set_node_param);
|
||||
ClassDB::bind_method(D_METHOD("set_node_param", "param"), &BTEvaluateExpression::set_node_param);
|
||||
ClassDB::bind_method(D_METHOD("get_node_param"), &BTEvaluateExpression::get_node_param);
|
||||
ClassDB::bind_method(D_METHOD("set_input_names", "p_input_names"), &BTEvaluateExpression::set_input_names);
|
||||
ClassDB::bind_method(D_METHOD("set_input_names", "input_names"), &BTEvaluateExpression::set_input_names);
|
||||
ClassDB::bind_method(D_METHOD("get_input_names"), &BTEvaluateExpression::get_input_names);
|
||||
ClassDB::bind_method(D_METHOD("set_input_values", "p_input_values"), &BTEvaluateExpression::set_input_values);
|
||||
ClassDB::bind_method(D_METHOD("set_input_values", "input_values"), &BTEvaluateExpression::set_input_values);
|
||||
ClassDB::bind_method(D_METHOD("get_input_values"), &BTEvaluateExpression::get_input_values);
|
||||
ClassDB::bind_method(D_METHOD("set_input_include_delta", "p_input_include_delta"), &BTEvaluateExpression::set_input_include_delta);
|
||||
ClassDB::bind_method(D_METHOD("set_input_include_delta", "input_include_delta"), &BTEvaluateExpression::set_input_include_delta);
|
||||
ClassDB::bind_method(D_METHOD("is_input_delta_included"), &BTEvaluateExpression::is_input_delta_included);
|
||||
ClassDB::bind_method(D_METHOD("set_result_var", "p_result_var"), &BTEvaluateExpression::set_result_var);
|
||||
ClassDB::bind_method(D_METHOD("set_result_var", "variable"), &BTEvaluateExpression::set_result_var);
|
||||
ClassDB::bind_method(D_METHOD("get_result_var"), &BTEvaluateExpression::get_result_var);
|
||||
|
||||
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "node", PROPERTY_HINT_RESOURCE_TYPE, "BBNode"), "set_node_param", "get_node_param");
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bt_random_wait.cpp
|
||||
* =============================================================================
|
||||
* Copyright 2021-2023 Serhii Snitsaruk
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
@ -48,9 +48,9 @@ void BTRandomWait::set_max_duration(double p_max_duration) {
|
|||
}
|
||||
|
||||
void BTRandomWait::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("set_min_duration", "p_value"), &BTRandomWait::set_min_duration);
|
||||
ClassDB::bind_method(D_METHOD("set_min_duration", "duration_sec"), &BTRandomWait::set_min_duration);
|
||||
ClassDB::bind_method(D_METHOD("get_min_duration"), &BTRandomWait::get_min_duration);
|
||||
ClassDB::bind_method(D_METHOD("set_max_duration", "p_value"), &BTRandomWait::set_max_duration);
|
||||
ClassDB::bind_method(D_METHOD("set_max_duration", "duration_sec"), &BTRandomWait::set_max_duration);
|
||||
ClassDB::bind_method(D_METHOD("get_max_duration"), &BTRandomWait::get_max_duration);
|
||||
|
||||
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "min_duration"), "set_min_duration", "get_min_duration");
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bt_random_wait.h
|
||||
* =============================================================================
|
||||
* Copyright 2021-2023 Serhii Snitsaruk
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bt_wait.cpp
|
||||
* =============================================================================
|
||||
* Copyright 2021-2023 Serhii Snitsaruk
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
@ -24,7 +24,7 @@ BT::Status BTWait::_tick(double p_delta) {
|
|||
}
|
||||
|
||||
void BTWait::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("set_duration", "p_value"), &BTWait::set_duration);
|
||||
ClassDB::bind_method(D_METHOD("set_duration", "duration_sec"), &BTWait::set_duration);
|
||||
ClassDB::bind_method(D_METHOD("get_duration"), &BTWait::get_duration);
|
||||
|
||||
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "duration"), "set_duration", "get_duration");
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bt_wait_ticks.cpp
|
||||
* =============================================================================
|
||||
* Copyright 2021-2023 Serhii Snitsaruk
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
@ -29,7 +29,7 @@ BT::Status BTWaitTicks::_tick(double p_delta) {
|
|||
}
|
||||
|
||||
void BTWaitTicks::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("set_num_ticks", "p_value"), &BTWaitTicks::set_num_ticks);
|
||||
ClassDB::bind_method(D_METHOD("set_num_ticks", "num_ticks"), &BTWaitTicks::set_num_ticks);
|
||||
ClassDB::bind_method(D_METHOD("get_num_ticks"), &BTWaitTicks::get_num_ticks);
|
||||
|
||||
ADD_PROPERTY(PropertyInfo(Variant::INT, "num_ticks"), "set_num_ticks", "get_num_ticks");
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bt_wait_ticks.h
|
||||
* =============================================================================
|
||||
* Copyright 2021-2023 Serhii Snitsaruk
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -49,11 +49,11 @@ Methods
|
|||
.. table::
|
||||
:widths: auto
|
||||
|
||||
+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` | :ref:`get_type<class_BBParam_method_get_type>` **(** **)** |const| |
|
||||
+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Variant | :ref:`get_value<class_BBParam_method_get_value>` **(** Object p_agent, :ref:`Blackboard<class_Blackboard>` p_blackboard, Variant p_default=null **)** |
|
||||
+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` | :ref:`get_type<class_BBParam_method_get_type>` **(** **)** |const| |
|
||||
+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Variant | :ref:`get_value<class_BBParam_method_get_value>` **(** Object agent, :ref:`Blackboard<class_Blackboard>` blackboard, Variant default=null **)** |
|
||||
+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
.. rst-class:: classref-section-separator
|
||||
|
||||
|
@ -167,7 +167,7 @@ Returns the expected data type of the parameter.
|
|||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
Variant **get_value** **(** Object p_agent, :ref:`Blackboard<class_Blackboard>` p_blackboard, Variant p_default=null **)**
|
||||
Variant **get_value** **(** Object agent, :ref:`Blackboard<class_Blackboard>` blackboard, Variant default=null **)**
|
||||
|
||||
Returns the value of the parameter.
|
||||
|
||||
|
|
|
@ -55,17 +55,17 @@ Methods
|
|||
.. table::
|
||||
:widths: auto
|
||||
|
||||
+-----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`BehaviorTree<class_BehaviorTree>` | :ref:`clone<class_BehaviorTree_method_clone>` **(** **)** |const| |
|
||||
+-----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`copy_other<class_BehaviorTree_method_copy_other>` **(** :ref:`BehaviorTree<class_BehaviorTree>` p_other **)** |
|
||||
+-----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`BTTask<class_BTTask>` | :ref:`get_root_task<class_BehaviorTree_method_get_root_task>` **(** **)** |const| |
|
||||
+-----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`BTTask<class_BTTask>` | :ref:`instantiate<class_BehaviorTree_method_instantiate>` **(** Node p_agent, :ref:`Blackboard<class_Blackboard>` p_blackboard **)** |const| |
|
||||
+-----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_root_task<class_BehaviorTree_method_set_root_task>` **(** :ref:`BTTask<class_BTTask>` p_value **)** |
|
||||
+-----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
+-----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`BehaviorTree<class_BehaviorTree>` | :ref:`clone<class_BehaviorTree_method_clone>` **(** **)** |const| |
|
||||
+-----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`copy_other<class_BehaviorTree_method_copy_other>` **(** :ref:`BehaviorTree<class_BehaviorTree>` other **)** |
|
||||
+-----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`BTTask<class_BTTask>` | :ref:`get_root_task<class_BehaviorTree_method_get_root_task>` **(** **)** |const| |
|
||||
+-----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`BTTask<class_BTTask>` | :ref:`instantiate<class_BehaviorTree_method_instantiate>` **(** Node agent, :ref:`Blackboard<class_Blackboard>` blackboard **)** |const| |
|
||||
+-----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_root_task<class_BehaviorTree_method_set_root_task>` **(** :ref:`BTTask<class_BTTask>` task **)** |
|
||||
+-----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
.. rst-class:: classref-section-separator
|
||||
|
||||
|
@ -131,7 +131,7 @@ Makes a copy of the BehaviorTree resource.
|
|||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
void **copy_other** **(** :ref:`BehaviorTree<class_BehaviorTree>` p_other **)**
|
||||
void **copy_other** **(** :ref:`BehaviorTree<class_BehaviorTree>` other **)**
|
||||
|
||||
Become a copy of another behavior tree.
|
||||
|
||||
|
@ -155,7 +155,7 @@ Returns the root task of the BehaviorTree resource.
|
|||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`BTTask<class_BTTask>` **instantiate** **(** Node p_agent, :ref:`Blackboard<class_Blackboard>` p_blackboard **)** |const|
|
||||
:ref:`BTTask<class_BTTask>` **instantiate** **(** Node agent, :ref:`Blackboard<class_Blackboard>` blackboard **)** |const|
|
||||
|
||||
Instantiates the Behavior Tree and returns the root :ref:`BTTask<class_BTTask>`.
|
||||
|
||||
|
@ -167,7 +167,7 @@ Instantiates the Behavior Tree and returns the root :ref:`BTTask<class_BTTask>`.
|
|||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
void **set_root_task** **(** :ref:`BTTask<class_BTTask>` p_value **)**
|
||||
void **set_root_task** **(** :ref:`BTTask<class_BTTask>` task **)**
|
||||
|
||||
Assigns a new root task to the **BehaviorTree** resource.
|
||||
|
||||
|
|
|
@ -31,9 +31,9 @@ Methods
|
|||
.. table::
|
||||
:widths: auto
|
||||
|
||||
+-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`BehaviorTreeData<class_BehaviorTreeData>` | :ref:`create_from_tree_instance<class_BehaviorTreeData_method_create_from_tree_instance>` **(** :ref:`BTTask<class_BTTask>` p_tree_instance **)** |static| |
|
||||
+-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
+-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`BehaviorTreeData<class_BehaviorTreeData>` | :ref:`create_from_tree_instance<class_BehaviorTreeData_method_create_from_tree_instance>` **(** :ref:`BTTask<class_BTTask>` tree_instance **)** |static| |
|
||||
+-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
.. rst-class:: classref-section-separator
|
||||
|
||||
|
@ -48,9 +48,9 @@ Method Descriptions
|
|||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`BehaviorTreeData<class_BehaviorTreeData>` **create_from_tree_instance** **(** :ref:`BTTask<class_BTTask>` p_tree_instance **)** |static|
|
||||
:ref:`BehaviorTreeData<class_BehaviorTreeData>` **create_from_tree_instance** **(** :ref:`BTTask<class_BTTask>` tree_instance **)** |static|
|
||||
|
||||
Returns current state of the ``p_tree_instance`` encoded as a **BehaviorTreeData**, suitable for use with :ref:`BehaviorTreeView<class_BehaviorTreeView>`.
|
||||
Returns current state of the ``tree_instance`` encoded as a **BehaviorTreeData**, suitable for use with :ref:`BehaviorTreeView<class_BehaviorTreeView>`.
|
||||
|
||||
Behavior tree instance can be acquired with :ref:`BTPlayer.get_tree_instance<class_BTPlayer_method_get_tree_instance>`.
|
||||
|
||||
|
|
|
@ -41,9 +41,9 @@ Methods
|
|||
.. table::
|
||||
:widths: auto
|
||||
|
||||
+------+------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`update_tree<class_BehaviorTreeView_method_update_tree>` **(** :ref:`BehaviorTreeData<class_BehaviorTreeData>` p_behavior_tree_data **)** |
|
||||
+------+------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
+------+----------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`update_tree<class_BehaviorTreeView_method_update_tree>` **(** :ref:`BehaviorTreeData<class_BehaviorTreeData>` behavior_tree_data **)** |
|
||||
+------+----------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
.. rst-class:: classref-section-separator
|
||||
|
||||
|
@ -58,7 +58,7 @@ Signals
|
|||
|
||||
.. rst-class:: classref-signal
|
||||
|
||||
**task_selected** **(** String p_type_name, String p_script_path **)**
|
||||
**task_selected** **(** String type_name, String script_path **)**
|
||||
|
||||
Emitted when a task item is selected in **BehaviorTreeView**.
|
||||
|
||||
|
@ -97,7 +97,7 @@ Method Descriptions
|
|||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
void **update_tree** **(** :ref:`BehaviorTreeData<class_BehaviorTreeData>` p_behavior_tree_data **)**
|
||||
void **update_tree** **(** :ref:`BehaviorTreeData<class_BehaviorTreeData>` behavior_tree_data **)**
|
||||
|
||||
Updates the representation of a :ref:`BehaviorTree<class_BehaviorTree>` instance. See also :ref:`BehaviorTreeData<class_BehaviorTreeData>`.
|
||||
|
||||
|
|
|
@ -33,27 +33,27 @@ Methods
|
|||
.. table::
|
||||
:widths: auto
|
||||
|
||||
+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`bind_var_to_property<class_Blackboard_method_bind_var_to_property>` **(** StringName p_name, Object p_object, StringName p_property **)** |
|
||||
+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`erase_var<class_Blackboard_method_erase_var>` **(** StringName p_name **)** |
|
||||
+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Blackboard<class_Blackboard>` | :ref:`get_parent<class_Blackboard_method_get_parent>` **(** **)** |const| |
|
||||
+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Variant | :ref:`get_var<class_Blackboard_method_get_var>` **(** StringName p_name, Variant p_default=null, bool p_complain=true **)** |const| |
|
||||
+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| bool | :ref:`has_var<class_Blackboard_method_has_var>` **(** StringName p_name **)** |const| |
|
||||
+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`prefetch_nodepath_vars<class_Blackboard_method_prefetch_nodepath_vars>` **(** Node p_node **)** |
|
||||
+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_parent<class_Blackboard_method_set_parent>` **(** :ref:`Blackboard<class_Blackboard>` p_blackboard **)** |
|
||||
+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_var<class_Blackboard_method_set_var>` **(** StringName p_name, Variant p_value **)** |
|
||||
+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Blackboard<class_Blackboard>` | :ref:`top<class_Blackboard_method_top>` **(** **)** |const| |
|
||||
+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`unbind_var<class_Blackboard_method_unbind_var>` **(** StringName p_name **)** |
|
||||
+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
+-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`bind_var_to_property<class_Blackboard_method_bind_var_to_property>` **(** StringName var_name, Object object, StringName property **)** |
|
||||
+-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`erase_var<class_Blackboard_method_erase_var>` **(** StringName var_name **)** |
|
||||
+-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Blackboard<class_Blackboard>` | :ref:`get_parent<class_Blackboard_method_get_parent>` **(** **)** |const| |
|
||||
+-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Variant | :ref:`get_var<class_Blackboard_method_get_var>` **(** StringName var_name, Variant default=null, bool complain=true **)** |const| |
|
||||
+-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| bool | :ref:`has_var<class_Blackboard_method_has_var>` **(** StringName var_name **)** |const| |
|
||||
+-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`prefetch_nodepath_vars<class_Blackboard_method_prefetch_nodepath_vars>` **(** Node node **)** |
|
||||
+-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_parent<class_Blackboard_method_set_parent>` **(** :ref:`Blackboard<class_Blackboard>` blackboard **)** |
|
||||
+-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_var<class_Blackboard_method_set_var>` **(** StringName var_name, Variant value **)** |
|
||||
+-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Blackboard<class_Blackboard>` | :ref:`top<class_Blackboard_method_top>` **(** **)** |const| |
|
||||
+-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`unbind_var<class_Blackboard_method_unbind_var>` **(** StringName var_name **)** |
|
||||
+-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
.. rst-class:: classref-section-separator
|
||||
|
||||
|
@ -68,9 +68,9 @@ Method Descriptions
|
|||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
void **bind_var_to_property** **(** StringName p_name, Object p_object, StringName p_property **)**
|
||||
void **bind_var_to_property** **(** StringName var_name, Object object, StringName property **)**
|
||||
|
||||
Establish a binding between a variable and the object's property specified by ``p_property`` and ``p_object``. Changes to the variable update the property, and vice versa.
|
||||
Establish a binding between a variable and the object's property specified by ``property`` and ``object``. Changes to the variable update the property, and vice versa.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
|
@ -80,7 +80,7 @@ Establish a binding between a variable and the object's property specified by ``
|
|||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
void **erase_var** **(** StringName p_name **)**
|
||||
void **erase_var** **(** StringName var_name **)**
|
||||
|
||||
Removes a variable by its name.
|
||||
|
||||
|
@ -104,9 +104,9 @@ Returns a Blackboard that serves as the parent scope for this instance.
|
|||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
Variant **get_var** **(** StringName p_name, Variant p_default=null, bool p_complain=true **)** |const|
|
||||
Variant **get_var** **(** StringName var_name, Variant default=null, bool complain=true **)** |const|
|
||||
|
||||
Returns variable value or ``p_default`` if variable doesn't exist. If ``p_complain`` is ``true``, an error will be printed if variable doesn't exist.
|
||||
Returns variable value or ``default`` if variable doesn't exist. If ``complain`` is ``true``, an error will be printed if variable doesn't exist.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
|
@ -116,9 +116,9 @@ Returns variable value or ``p_default`` if variable doesn't exist. If ``p_compla
|
|||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
bool **has_var** **(** StringName p_name **)** |const|
|
||||
bool **has_var** **(** StringName var_name **)** |const|
|
||||
|
||||
Returns ``true`` if the Blackboard contains the ``p_name`` variable, including the parent scopes.
|
||||
Returns ``true`` if the Blackboard contains the ``var_name`` variable, including the parent scopes.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
|
@ -128,7 +128,7 @@ Returns ``true`` if the Blackboard contains the ``p_name`` variable, including t
|
|||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
void **prefetch_nodepath_vars** **(** Node p_node **)**
|
||||
void **prefetch_nodepath_vars** **(** Node node **)**
|
||||
|
||||
If ``true``, any ``NodePath`` variables in the **Blackboard** are replaced with ``Node`` references when the tree is instantiated. References are retrieved by calling :ref:`Node.get_node<class_Node_method_get_node>` on the agent instance.
|
||||
|
||||
|
@ -140,7 +140,7 @@ If ``true``, any ``NodePath`` variables in the **Blackboard** are replaced with
|
|||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
void **set_parent** **(** :ref:`Blackboard<class_Blackboard>` p_blackboard **)**
|
||||
void **set_parent** **(** :ref:`Blackboard<class_Blackboard>` blackboard **)**
|
||||
|
||||
Assigns the parent scope. If a value isn't in the current Blackboard scope, it will look in the parent scope Blackboard to find it.
|
||||
|
||||
|
@ -152,7 +152,7 @@ Assigns the parent scope. If a value isn't in the current Blackboard scope, it w
|
|||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
void **set_var** **(** StringName p_name, Variant p_value **)**
|
||||
void **set_var** **(** StringName var_name, Variant value **)**
|
||||
|
||||
Assigns a value to a Blackboard variable.
|
||||
|
||||
|
@ -176,7 +176,7 @@ Returns the topmost **Blackboard** in the scope chain.
|
|||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
void **unbind_var** **(** StringName p_name **)**
|
||||
void **unbind_var** **(** StringName var_name **)**
|
||||
|
||||
Remove binding from a variable.
|
||||
|
||||
|
|
|
@ -22,11 +22,11 @@ Methods
|
|||
.. table::
|
||||
:widths: auto
|
||||
|
||||
+-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Blackboard<class_Blackboard>` | :ref:`create_blackboard<class_BlackboardPlan_method_create_blackboard>` **(** **)** |
|
||||
+-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`populate_blackboard<class_BlackboardPlan_method_populate_blackboard>` **(** :ref:`Blackboard<class_Blackboard>` p_blackboard, bool p_overwrite **)** |
|
||||
+-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Blackboard<class_Blackboard>` | :ref:`create_blackboard<class_BlackboardPlan_method_create_blackboard>` **(** **)** |
|
||||
+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`populate_blackboard<class_BlackboardPlan_method_populate_blackboard>` **(** :ref:`Blackboard<class_Blackboard>` blackboard, bool overwrite **)** |
|
||||
+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
.. rst-class:: classref-section-separator
|
||||
|
||||
|
@ -53,9 +53,9 @@ Constructs a new instance of a :ref:`Blackboard<class_Blackboard>` using this pl
|
|||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
void **populate_blackboard** **(** :ref:`Blackboard<class_Blackboard>` p_blackboard, bool p_overwrite **)**
|
||||
void **populate_blackboard** **(** :ref:`Blackboard<class_Blackboard>` blackboard, bool overwrite **)**
|
||||
|
||||
Populates ``p_blackboard`` with the variables from this plan. If ``p_overwrite`` is ``true``, existing variables with the same names will be overwritten.
|
||||
Populates ``blackboard`` with the variables from this plan. If ``overwrite`` is ``true``, existing variables with the same names will be overwritten.
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
|
|
|
@ -62,7 +62,7 @@ Methods
|
|||
+-----------------------------+-----------------------------------------------------------------------------------+
|
||||
| void | :ref:`restart<class_BTPlayer_method_restart>` **(** **)** |
|
||||
+-----------------------------+-----------------------------------------------------------------------------------+
|
||||
| void | :ref:`update<class_BTPlayer_method_update>` **(** float p_delta **)** |
|
||||
| void | :ref:`update<class_BTPlayer_method_update>` **(** float delta **)** |
|
||||
+-----------------------------+-----------------------------------------------------------------------------------+
|
||||
|
||||
.. rst-class:: classref-section-separator
|
||||
|
@ -78,11 +78,11 @@ Signals
|
|||
|
||||
.. rst-class:: classref-signal
|
||||
|
||||
**behavior_tree_finished** **(** int p_status **)**
|
||||
**behavior_tree_finished** **(** int status **)**
|
||||
|
||||
Emitted when the behavior tree has finished executing and returned ``SUCCESS`` or ``FAILURE``.
|
||||
|
||||
Argument ``p_status`` holds the status returned by the behavior tree. See :ref:`Status<enum_BT_Status>`.
|
||||
Argument ``status`` holds the status returned by the behavior tree. See :ref:`Status<enum_BT_Status>`.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
|
@ -92,11 +92,11 @@ Argument ``p_status`` holds the status returned by the behavior tree. See :ref:`
|
|||
|
||||
.. rst-class:: classref-signal
|
||||
|
||||
**updated** **(** int p_status **)**
|
||||
**updated** **(** int status **)**
|
||||
|
||||
Emitted when BTPlayer has finished the behavior tree update.
|
||||
|
||||
Argument ``p_status`` holds the status returned by the behavior tree. See :ref:`Status<enum_BT_Status>`.
|
||||
Argument ``status`` holds the status returned by the behavior tree. See :ref:`Status<enum_BT_Status>`.
|
||||
|
||||
.. rst-class:: classref-section-separator
|
||||
|
||||
|
@ -305,7 +305,7 @@ Resets the behavior tree's execution. Each running task will be aborted and the
|
|||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
void **update** **(** float p_delta **)**
|
||||
void **update** **(** float delta **)**
|
||||
|
||||
Executes the root task of the behavior tree instance if :ref:`active<class_BTPlayer_property_active>` is ``true``. Call this method when :ref:`update_mode<class_BTPlayer_property_update_mode>` is set to :ref:`MANUAL<class_BTPlayer_constant_MANUAL>`. When :ref:`update_mode<class_BTPlayer_property_update_mode>` is not :ref:`MANUAL<class_BTPlayer_constant_MANUAL>`, the :ref:`update<class_BTPlayer_method_update>` will be called automatically. See :ref:`UpdateMode<enum_BTPlayer_UpdateMode>`.
|
||||
|
||||
|
|
|
@ -52,17 +52,17 @@ Methods
|
|||
:widths: auto
|
||||
|
||||
+-------+-------------------------------------------------------------------------------------------------------------------------+
|
||||
| float | :ref:`get_probability<class_BTProbabilitySelector_method_get_probability>` **(** int p_index **)** |const| |
|
||||
| float | :ref:`get_probability<class_BTProbabilitySelector_method_get_probability>` **(** int child_idx **)** |const| |
|
||||
+-------+-------------------------------------------------------------------------------------------------------------------------+
|
||||
| float | :ref:`get_total_weight<class_BTProbabilitySelector_method_get_total_weight>` **(** **)** |const| |
|
||||
+-------+-------------------------------------------------------------------------------------------------------------------------+
|
||||
| float | :ref:`get_weight<class_BTProbabilitySelector_method_get_weight>` **(** int p_index **)** |const| |
|
||||
| float | :ref:`get_weight<class_BTProbabilitySelector_method_get_weight>` **(** int child_idx **)** |const| |
|
||||
+-------+-------------------------------------------------------------------------------------------------------------------------+
|
||||
| bool | :ref:`has_probability<class_BTProbabilitySelector_method_has_probability>` **(** int p_index **)** |const| |
|
||||
| bool | :ref:`has_probability<class_BTProbabilitySelector_method_has_probability>` **(** int child_idx **)** |const| |
|
||||
+-------+-------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_probability<class_BTProbabilitySelector_method_set_probability>` **(** int p_index, float p_probability **)** |
|
||||
| void | :ref:`set_probability<class_BTProbabilitySelector_method_set_probability>` **(** int child_idx, float probability **)** |
|
||||
+-------+-------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_weight<class_BTProbabilitySelector_method_set_weight>` **(** int p_index, float p_weight **)** |
|
||||
| void | :ref:`set_weight<class_BTProbabilitySelector_method_set_weight>` **(** int child_idx, float weight **)** |
|
||||
+-------+-------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
.. rst-class:: classref-section-separator
|
||||
|
@ -100,7 +100,7 @@ Method Descriptions
|
|||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
float **get_probability** **(** int p_index **)** |const|
|
||||
float **get_probability** **(** int child_idx **)** |const|
|
||||
|
||||
Returns the child task's selection probability.
|
||||
|
||||
|
@ -124,7 +124,7 @@ Returns the total weight of all child tasks.
|
|||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
float **get_weight** **(** int p_index **)** |const|
|
||||
float **get_weight** **(** int child_idx **)** |const|
|
||||
|
||||
Returns the child task's weight within the weighted probability selection algorithm.
|
||||
|
||||
|
@ -136,9 +136,9 @@ Returns the child task's weight within the weighted probability selection algori
|
|||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
bool **has_probability** **(** int p_index **)** |const|
|
||||
bool **has_probability** **(** int child_idx **)** |const|
|
||||
|
||||
Returns whether the child task at index ``p_index`` participates within the weighted probability selection algorithm and has a probability assigned to it. Returns ``false`` for :ref:`BTComment<class_BTComment>` tasks.
|
||||
Returns whether the child task at index ``child_idx`` participates within the weighted probability selection algorithm and has a probability assigned to it. Returns ``false`` for :ref:`BTComment<class_BTComment>` tasks.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
|
@ -148,7 +148,7 @@ Returns whether the child task at index ``p_index`` participates within the weig
|
|||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
void **set_probability** **(** int p_index, float p_probability **)**
|
||||
void **set_probability** **(** int child_idx, float probability **)**
|
||||
|
||||
Sets the child task's weight calculated based on the desired probability.
|
||||
|
||||
|
@ -160,7 +160,7 @@ Sets the child task's weight calculated based on the desired probability.
|
|||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
void **set_weight** **(** int p_index, float p_weight **)**
|
||||
void **set_weight** **(** int child_idx, float weight **)**
|
||||
|
||||
Sets the child task's weight for the weighted probability selection algorithm.
|
||||
|
||||
|
|
|
@ -57,59 +57,59 @@ Methods
|
|||
.. table::
|
||||
:widths: auto
|
||||
|
||||
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`_enter<class_BTTask_private_method__enter>` **(** **)** |virtual| |
|
||||
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`_exit<class_BTTask_private_method__exit>` **(** **)** |virtual| |
|
||||
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------+
|
||||
| String | :ref:`_generate_name<class_BTTask_private_method__generate_name>` **(** **)** |virtual| |const| |
|
||||
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------+
|
||||
| PackedStringArray | :ref:`_get_configuration_warnings<class_BTTask_private_method__get_configuration_warnings>` **(** **)** |virtual| |const| |
|
||||
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`_setup<class_BTTask_private_method__setup>` **(** **)** |virtual| |
|
||||
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Status<enum_BT_Status>` | :ref:`_tick<class_BTTask_private_method__tick>` **(** float p_delta **)** |virtual| |
|
||||
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`abort<class_BTTask_method_abort>` **(** **)** |
|
||||
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`add_child<class_BTTask_method_add_child>` **(** :ref:`BTTask<class_BTTask>` p_child **)** |
|
||||
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`add_child_at_index<class_BTTask_method_add_child_at_index>` **(** :ref:`BTTask<class_BTTask>` p_child, int p_idx **)** |
|
||||
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`BTTask<class_BTTask>` | :ref:`clone<class_BTTask_method_clone>` **(** **)** |const| |
|
||||
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Status<enum_BT_Status>` | :ref:`execute<class_BTTask_method_execute>` **(** float p_delta **)** |
|
||||
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`BTTask<class_BTTask>` | :ref:`get_child<class_BTTask_method_get_child>` **(** int p_idx **)** |const| |
|
||||
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------+
|
||||
| int | :ref:`get_child_count<class_BTTask_method_get_child_count>` **(** **)** |const| |
|
||||
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------+
|
||||
| int | :ref:`get_child_count_excluding_comments<class_BTTask_method_get_child_count_excluding_comments>` **(** **)** |const| |
|
||||
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------+
|
||||
| int | :ref:`get_index<class_BTTask_method_get_index>` **(** **)** |const| |
|
||||
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`BTTask<class_BTTask>` | :ref:`get_parent<class_BTTask_method_get_parent>` **(** **)** |const| |
|
||||
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`BTTask<class_BTTask>` | :ref:`get_root<class_BTTask_method_get_root>` **(** **)** |const| |
|
||||
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------+
|
||||
| String | :ref:`get_task_name<class_BTTask_method_get_task_name>` **(** **)** |
|
||||
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------+
|
||||
| bool | :ref:`has_child<class_BTTask_method_has_child>` **(** :ref:`BTTask<class_BTTask>` p_child **)** |const| |
|
||||
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`initialize<class_BTTask_method_initialize>` **(** Node p_agent, :ref:`Blackboard<class_Blackboard>` p_blackboard **)** |
|
||||
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------+
|
||||
| bool | :ref:`is_descendant_of<class_BTTask_method_is_descendant_of>` **(** :ref:`BTTask<class_BTTask>` p_task **)** |const| |
|
||||
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------+
|
||||
| bool | :ref:`is_root<class_BTTask_method_is_root>` **(** **)** |const| |
|
||||
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`BTTask<class_BTTask>` | :ref:`next_sibling<class_BTTask_method_next_sibling>` **(** **)** |const| |
|
||||
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`print_tree<class_BTTask_method_print_tree>` **(** int p_initial_tabs=0 **)** |
|
||||
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`remove_child<class_BTTask_method_remove_child>` **(** :ref:`BTTask<class_BTTask>` p_child **)** |
|
||||
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`remove_child_at_index<class_BTTask_method_remove_child_at_index>` **(** int p_idx **)** |
|
||||
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------+
|
||||
+-------------------------------+---------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`_enter<class_BTTask_private_method__enter>` **(** **)** |virtual| |
|
||||
+-------------------------------+---------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`_exit<class_BTTask_private_method__exit>` **(** **)** |virtual| |
|
||||
+-------------------------------+---------------------------------------------------------------------------------------------------------------------------+
|
||||
| String | :ref:`_generate_name<class_BTTask_private_method__generate_name>` **(** **)** |virtual| |const| |
|
||||
+-------------------------------+---------------------------------------------------------------------------------------------------------------------------+
|
||||
| PackedStringArray | :ref:`_get_configuration_warnings<class_BTTask_private_method__get_configuration_warnings>` **(** **)** |virtual| |const| |
|
||||
+-------------------------------+---------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`_setup<class_BTTask_private_method__setup>` **(** **)** |virtual| |
|
||||
+-------------------------------+---------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Status<enum_BT_Status>` | :ref:`_tick<class_BTTask_private_method__tick>` **(** float delta **)** |virtual| |
|
||||
+-------------------------------+---------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`abort<class_BTTask_method_abort>` **(** **)** |
|
||||
+-------------------------------+---------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`add_child<class_BTTask_method_add_child>` **(** :ref:`BTTask<class_BTTask>` task **)** |
|
||||
+-------------------------------+---------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`add_child_at_index<class_BTTask_method_add_child_at_index>` **(** :ref:`BTTask<class_BTTask>` task, int idx **)** |
|
||||
+-------------------------------+---------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`BTTask<class_BTTask>` | :ref:`clone<class_BTTask_method_clone>` **(** **)** |const| |
|
||||
+-------------------------------+---------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Status<enum_BT_Status>` | :ref:`execute<class_BTTask_method_execute>` **(** float delta **)** |
|
||||
+-------------------------------+---------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`BTTask<class_BTTask>` | :ref:`get_child<class_BTTask_method_get_child>` **(** int idx **)** |const| |
|
||||
+-------------------------------+---------------------------------------------------------------------------------------------------------------------------+
|
||||
| int | :ref:`get_child_count<class_BTTask_method_get_child_count>` **(** **)** |const| |
|
||||
+-------------------------------+---------------------------------------------------------------------------------------------------------------------------+
|
||||
| int | :ref:`get_child_count_excluding_comments<class_BTTask_method_get_child_count_excluding_comments>` **(** **)** |const| |
|
||||
+-------------------------------+---------------------------------------------------------------------------------------------------------------------------+
|
||||
| int | :ref:`get_index<class_BTTask_method_get_index>` **(** **)** |const| |
|
||||
+-------------------------------+---------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`BTTask<class_BTTask>` | :ref:`get_parent<class_BTTask_method_get_parent>` **(** **)** |const| |
|
||||
+-------------------------------+---------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`BTTask<class_BTTask>` | :ref:`get_root<class_BTTask_method_get_root>` **(** **)** |const| |
|
||||
+-------------------------------+---------------------------------------------------------------------------------------------------------------------------+
|
||||
| String | :ref:`get_task_name<class_BTTask_method_get_task_name>` **(** **)** |
|
||||
+-------------------------------+---------------------------------------------------------------------------------------------------------------------------+
|
||||
| bool | :ref:`has_child<class_BTTask_method_has_child>` **(** :ref:`BTTask<class_BTTask>` task **)** |const| |
|
||||
+-------------------------------+---------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`initialize<class_BTTask_method_initialize>` **(** Node agent, :ref:`Blackboard<class_Blackboard>` blackboard **)** |
|
||||
+-------------------------------+---------------------------------------------------------------------------------------------------------------------------+
|
||||
| bool | :ref:`is_descendant_of<class_BTTask_method_is_descendant_of>` **(** :ref:`BTTask<class_BTTask>` task **)** |const| |
|
||||
+-------------------------------+---------------------------------------------------------------------------------------------------------------------------+
|
||||
| bool | :ref:`is_root<class_BTTask_method_is_root>` **(** **)** |const| |
|
||||
+-------------------------------+---------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`BTTask<class_BTTask>` | :ref:`next_sibling<class_BTTask_method_next_sibling>` **(** **)** |const| |
|
||||
+-------------------------------+---------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`print_tree<class_BTTask_method_print_tree>` **(** int initial_tabs=0 **)** |
|
||||
+-------------------------------+---------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`remove_child<class_BTTask_method_remove_child>` **(** :ref:`BTTask<class_BTTask>` task **)** |
|
||||
+-------------------------------+---------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`remove_child_at_index<class_BTTask_method_remove_child_at_index>` **(** int idx **)** |
|
||||
+-------------------------------+---------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
.. rst-class:: classref-section-separator
|
||||
|
||||
|
@ -277,7 +277,7 @@ Called to initialize a task during initialization step. It is called only once b
|
|||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`Status<enum_BT_Status>` **_tick** **(** float p_delta **)** |virtual|
|
||||
:ref:`Status<enum_BT_Status>` **_tick** **(** float delta **)** |virtual|
|
||||
|
||||
Called when task is "ticked", i.e. executed by :ref:`BTPlayer<class_BTPlayer>` or :ref:`BTState<class_BTState>` during an update.
|
||||
|
||||
|
@ -305,9 +305,9 @@ Resets the task and its children recursively. If a task is in the ``RUNNING`` st
|
|||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
void **add_child** **(** :ref:`BTTask<class_BTTask>` p_child **)**
|
||||
void **add_child** **(** :ref:`BTTask<class_BTTask>` task **)**
|
||||
|
||||
Adds a child task. The ``p_child`` is placed at the end of the children list.
|
||||
Adds a child task. The ``task`` is placed at the end of the children list.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
|
@ -317,9 +317,9 @@ Adds a child task. The ``p_child`` is placed at the end of the children list.
|
|||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
void **add_child_at_index** **(** :ref:`BTTask<class_BTTask>` p_child, int p_idx **)**
|
||||
void **add_child_at_index** **(** :ref:`BTTask<class_BTTask>` task, int idx **)**
|
||||
|
||||
Adds a child task. The ``p_child`` is placed at ``p_idx`` position in the children list.
|
||||
Adds a child task. The ``task`` is placed at ``idx`` position in the children list.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
|
@ -341,7 +341,7 @@ Duplicates the task and its children, copying the exported members. Sub-resource
|
|||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`Status<enum_BT_Status>` **execute** **(** float p_delta **)**
|
||||
:ref:`Status<enum_BT_Status>` **execute** **(** float delta **)**
|
||||
|
||||
Performs task's execution. The execution follows a specific sequence:
|
||||
|
||||
|
@ -359,7 +359,7 @@ Performs task's execution. The execution follows a specific sequence:
|
|||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`BTTask<class_BTTask>` **get_child** **(** int p_idx **)** |const|
|
||||
:ref:`BTTask<class_BTTask>` **get_child** **(** int idx **)** |const|
|
||||
|
||||
Returns a child task by specifying its index.
|
||||
|
||||
|
@ -445,9 +445,9 @@ Method :ref:`_generate_name<class_BTTask_private_method__generate_name>` is call
|
|||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
bool **has_child** **(** :ref:`BTTask<class_BTTask>` p_child **)** |const|
|
||||
bool **has_child** **(** :ref:`BTTask<class_BTTask>` task **)** |const|
|
||||
|
||||
Returns ``true`` if ``p_child`` is a child of this task.
|
||||
Returns ``true`` if ``task`` is a child of this task.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
|
@ -457,7 +457,7 @@ Returns ``true`` if ``p_child`` is a child of this task.
|
|||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
void **initialize** **(** Node p_agent, :ref:`Blackboard<class_Blackboard>` p_blackboard **)**
|
||||
void **initialize** **(** Node agent, :ref:`Blackboard<class_Blackboard>` blackboard **)**
|
||||
|
||||
Initilizes the task. Assigns :ref:`agent<class_BTTask_property_agent>` and :ref:`blackboard<class_BTTask_property_blackboard>`, and calls :ref:`_setup<class_BTTask_private_method__setup>` for the task and its children.
|
||||
|
||||
|
@ -471,9 +471,9 @@ The method is called recursively for each child task.
|
|||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
bool **is_descendant_of** **(** :ref:`BTTask<class_BTTask>` p_task **)** |const|
|
||||
bool **is_descendant_of** **(** :ref:`BTTask<class_BTTask>` task **)** |const|
|
||||
|
||||
Returns ``true`` if this task is a descendant of ``p_task``. In other words, this task must be a child of ``p_task`` or one of its children or grandchildren.
|
||||
Returns ``true`` if this task is a descendant of ``task``. In other words, this task must be a child of ``task`` or one of its children or grandchildren.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
|
@ -509,7 +509,7 @@ Returns ``null`` if this task has no parent or it is the last child in the paren
|
|||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
void **print_tree** **(** int p_initial_tabs=0 **)**
|
||||
void **print_tree** **(** int initial_tabs=0 **)**
|
||||
|
||||
Prints the subtree that starts with this task to the console.
|
||||
|
||||
|
@ -521,9 +521,9 @@ Prints the subtree that starts with this task to the console.
|
|||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
void **remove_child** **(** :ref:`BTTask<class_BTTask>` p_child **)**
|
||||
void **remove_child** **(** :ref:`BTTask<class_BTTask>` task **)**
|
||||
|
||||
Removes ``p_child`` task from children.
|
||||
Removes ``task`` from children.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
|
@ -533,7 +533,7 @@ Removes ``p_child`` task from children.
|
|||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
void **remove_child_at_index** **(** int p_idx **)**
|
||||
void **remove_child_at_index** **(** int idx **)**
|
||||
|
||||
Removes a child task at a specified index from children.
|
||||
|
||||
|
|
|
@ -45,19 +45,19 @@ Methods
|
|||
.. table::
|
||||
:widths: auto
|
||||
|
||||
+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`add_transition<class_LimboHSM_method_add_transition>` **(** :ref:`LimboState<class_LimboState>` p_from_state, :ref:`LimboState<class_LimboState>` p_to_state, StringName p_event **)** |
|
||||
+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`LimboState<class_LimboState>` | :ref:`get_active_state<class_LimboHSM_method_get_active_state>` **(** **)** |const| |
|
||||
+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`LimboState<class_LimboState>` | :ref:`get_leaf_state<class_LimboHSM_method_get_leaf_state>` **(** **)** |const| |
|
||||
+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`initialize<class_LimboHSM_method_initialize>` **(** Node p_agent, :ref:`Blackboard<class_Blackboard>` p_parent_scope=null **)** |
|
||||
+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_active<class_LimboHSM_method_set_active>` **(** bool p_active **)** |
|
||||
+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`update<class_LimboHSM_method_update>` **(** float p_delta **)** |
|
||||
+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`add_transition<class_LimboHSM_method_add_transition>` **(** :ref:`LimboState<class_LimboState>` from_state, :ref:`LimboState<class_LimboState>` to_state, StringName event **)** |
|
||||
+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`LimboState<class_LimboState>` | :ref:`get_active_state<class_LimboHSM_method_get_active_state>` **(** **)** |const| |
|
||||
+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`LimboState<class_LimboState>` | :ref:`get_leaf_state<class_LimboHSM_method_get_leaf_state>` **(** **)** |const| |
|
||||
+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`initialize<class_LimboHSM_method_initialize>` **(** Node agent, :ref:`Blackboard<class_Blackboard>` parent_scope=null **)** |
|
||||
+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_active<class_LimboHSM_method_set_active>` **(** bool active **)** |
|
||||
+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`update<class_LimboHSM_method_update>` **(** float delta **)** |
|
||||
+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
.. rst-class:: classref-section-separator
|
||||
|
||||
|
@ -72,7 +72,7 @@ Signals
|
|||
|
||||
.. rst-class:: classref-signal
|
||||
|
||||
**state_changed** **(** :ref:`LimboState<class_LimboState>` p_state **)**
|
||||
**state_changed** **(** :ref:`LimboState<class_LimboState>` state **)**
|
||||
|
||||
Emitted when the currently active substate is switched to a different substate.
|
||||
|
||||
|
@ -183,9 +183,9 @@ Method Descriptions
|
|||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
void **add_transition** **(** :ref:`LimboState<class_LimboState>` p_from_state, :ref:`LimboState<class_LimboState>` p_to_state, StringName p_event **)**
|
||||
void **add_transition** **(** :ref:`LimboState<class_LimboState>` from_state, :ref:`LimboState<class_LimboState>` to_state, StringName event **)**
|
||||
|
||||
Establishes a transition from one state to another when ``p_event`` is dispatched. Both ``p_from_state`` and ``p_to_state`` must be immediate children of this state.
|
||||
Establishes a transition from one state to another when ``event`` is dispatched. Both ``from_state`` and ``to_state`` must be immediate children of this state.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
|
@ -219,7 +219,7 @@ Returns the currently active leaf state within the state machine.
|
|||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
void **initialize** **(** Node p_agent, :ref:`Blackboard<class_Blackboard>` p_parent_scope=null **)**
|
||||
void **initialize** **(** Node agent, :ref:`Blackboard<class_Blackboard>` parent_scope=null **)**
|
||||
|
||||
Initiates the state and calls :ref:`LimboState._setup<class_LimboState_private_method__setup>` for both itself and all substates.
|
||||
|
||||
|
@ -231,7 +231,7 @@ Initiates the state and calls :ref:`LimboState._setup<class_LimboState_private_m
|
|||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
void **set_active** **(** bool p_active **)**
|
||||
void **set_active** **(** bool active **)**
|
||||
|
||||
When set to ``true``, switches the state to :ref:`initial_state<class_LimboHSM_property_initial_state>` and activates state processing according to :ref:`update_mode<class_LimboHSM_property_update_mode>`.
|
||||
|
||||
|
@ -243,7 +243,7 @@ When set to ``true``, switches the state to :ref:`initial_state<class_LimboHSM_p
|
|||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
void **update** **(** float p_delta **)**
|
||||
void **update** **(** float delta **)**
|
||||
|
||||
Calls :ref:`LimboState._update<class_LimboState_private_method__update>` on itself and the active substate, with the call cascading down to the leaf state. This method is automatically triggered if :ref:`update_mode<class_LimboHSM_property_update_mode>` is not set to :ref:`MANUAL<class_LimboHSM_constant_MANUAL>`.
|
||||
|
||||
|
|
|
@ -53,35 +53,35 @@ Methods
|
|||
.. table::
|
||||
:widths: auto
|
||||
|
||||
+-------------------------------------+------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`_enter<class_LimboState_private_method__enter>` **(** **)** |virtual| |
|
||||
+-------------------------------------+------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`_exit<class_LimboState_private_method__exit>` **(** **)** |virtual| |
|
||||
+-------------------------------------+------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`_setup<class_LimboState_private_method__setup>` **(** **)** |virtual| |
|
||||
+-------------------------------------+------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`_update<class_LimboState_private_method__update>` **(** float p_delta **)** |virtual| |
|
||||
+-------------------------------------+------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`add_event_handler<class_LimboState_method_add_event_handler>` **(** StringName p_event, Callable p_handler **)** |
|
||||
+-------------------------------------+------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`LimboState<class_LimboState>` | :ref:`call_on_enter<class_LimboState_method_call_on_enter>` **(** Callable p_callable **)** |
|
||||
+-------------------------------------+------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`LimboState<class_LimboState>` | :ref:`call_on_exit<class_LimboState_method_call_on_exit>` **(** Callable p_callable **)** |
|
||||
+-------------------------------------+------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`LimboState<class_LimboState>` | :ref:`call_on_update<class_LimboState_method_call_on_update>` **(** Callable p_callable **)** |
|
||||
+-------------------------------------+------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`clear_guard<class_LimboState_method_clear_guard>` **(** **)** |
|
||||
+-------------------------------------+------------------------------------------------------------------------------------------------------------------------+
|
||||
| bool | :ref:`dispatch<class_LimboState_method_dispatch>` **(** StringName p_event, Variant p_cargo=null **)** |
|
||||
+-------------------------------------+------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`LimboState<class_LimboState>` | :ref:`get_root<class_LimboState_method_get_root>` **(** **)** |const| |
|
||||
+-------------------------------------+------------------------------------------------------------------------------------------------------------------------+
|
||||
| bool | :ref:`is_active<class_LimboState_method_is_active>` **(** **)** |const| |
|
||||
+-------------------------------------+------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`LimboState<class_LimboState>` | :ref:`named<class_LimboState_method_named>` **(** String p_name **)** |
|
||||
+-------------------------------------+------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_guard<class_LimboState_method_set_guard>` **(** Callable p_guard_callable **)** |
|
||||
+-------------------------------------+------------------------------------------------------------------------------------------------------------------------+
|
||||
+-------------------------------------+--------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`_enter<class_LimboState_private_method__enter>` **(** **)** |virtual| |
|
||||
+-------------------------------------+--------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`_exit<class_LimboState_private_method__exit>` **(** **)** |virtual| |
|
||||
+-------------------------------------+--------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`_setup<class_LimboState_private_method__setup>` **(** **)** |virtual| |
|
||||
+-------------------------------------+--------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`_update<class_LimboState_private_method__update>` **(** float delta **)** |virtual| |
|
||||
+-------------------------------------+--------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`add_event_handler<class_LimboState_method_add_event_handler>` **(** StringName event, Callable handler **)** |
|
||||
+-------------------------------------+--------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`LimboState<class_LimboState>` | :ref:`call_on_enter<class_LimboState_method_call_on_enter>` **(** Callable callable **)** |
|
||||
+-------------------------------------+--------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`LimboState<class_LimboState>` | :ref:`call_on_exit<class_LimboState_method_call_on_exit>` **(** Callable callable **)** |
|
||||
+-------------------------------------+--------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`LimboState<class_LimboState>` | :ref:`call_on_update<class_LimboState_method_call_on_update>` **(** Callable callable **)** |
|
||||
+-------------------------------------+--------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`clear_guard<class_LimboState_method_clear_guard>` **(** **)** |
|
||||
+-------------------------------------+--------------------------------------------------------------------------------------------------------------------+
|
||||
| bool | :ref:`dispatch<class_LimboState_method_dispatch>` **(** StringName event, Variant cargo=null **)** |
|
||||
+-------------------------------------+--------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`LimboState<class_LimboState>` | :ref:`get_root<class_LimboState_method_get_root>` **(** **)** |const| |
|
||||
+-------------------------------------+--------------------------------------------------------------------------------------------------------------------+
|
||||
| bool | :ref:`is_active<class_LimboState_method_is_active>` **(** **)** |const| |
|
||||
+-------------------------------------+--------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`LimboState<class_LimboState>` | :ref:`named<class_LimboState_method_named>` **(** String name **)** |
|
||||
+-------------------------------------+--------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_guard<class_LimboState_method_set_guard>` **(** Callable guard_callable **)** |
|
||||
+-------------------------------------+--------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
.. rst-class:: classref-section-separator
|
||||
|
||||
|
@ -132,7 +132,7 @@ Emitted when the state is initialized.
|
|||
|
||||
.. rst-class:: classref-signal
|
||||
|
||||
**updated** **(** float p_delta **)**
|
||||
**updated** **(** float delta **)**
|
||||
|
||||
Emitted when the state is updated.
|
||||
|
||||
|
@ -256,7 +256,7 @@ Called once during initialization. Use this method to initialize your state.
|
|||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
void **_update** **(** float p_delta **)** |virtual|
|
||||
void **_update** **(** float delta **)** |virtual|
|
||||
|
||||
Called during the update. Implement your state's behavior with this method.
|
||||
|
||||
|
@ -268,9 +268,9 @@ Called during the update. Implement your state's behavior with this method.
|
|||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
void **add_event_handler** **(** StringName p_event, Callable p_handler **)**
|
||||
void **add_event_handler** **(** StringName event, Callable handler **)**
|
||||
|
||||
Registers a ``p_handler`` to be called when ``p_event`` is dispatched.
|
||||
Registers a ``handler`` to be called when ``event`` is dispatched.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
|
@ -280,9 +280,9 @@ Registers a ``p_handler`` to be called when ``p_event`` is dispatched.
|
|||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`LimboState<class_LimboState>` **call_on_enter** **(** Callable p_callable **)**
|
||||
:ref:`LimboState<class_LimboState>` **call_on_enter** **(** Callable callable **)**
|
||||
|
||||
A chained method that connects the :ref:`entered<class_LimboState_signal_entered>` signal to a ``p_callable``.
|
||||
A chained method that connects the :ref:`entered<class_LimboState_signal_entered>` signal to a ``callable``.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
|
@ -292,9 +292,9 @@ A chained method that connects the :ref:`entered<class_LimboState_signal_entered
|
|||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`LimboState<class_LimboState>` **call_on_exit** **(** Callable p_callable **)**
|
||||
:ref:`LimboState<class_LimboState>` **call_on_exit** **(** Callable callable **)**
|
||||
|
||||
A chained method that connects the :ref:`exited<class_LimboState_signal_exited>` signal to a ``p_callable``.
|
||||
A chained method that connects the :ref:`exited<class_LimboState_signal_exited>` signal to a ``callable``.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
|
@ -304,9 +304,9 @@ A chained method that connects the :ref:`exited<class_LimboState_signal_exited>`
|
|||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`LimboState<class_LimboState>` **call_on_update** **(** Callable p_callable **)**
|
||||
:ref:`LimboState<class_LimboState>` **call_on_update** **(** Callable callable **)**
|
||||
|
||||
A chained method that connects the :ref:`updated<class_LimboState_signal_updated>` signal to a ``p_callable``.
|
||||
A chained method that connects the :ref:`updated<class_LimboState_signal_updated>` signal to a ``callable``.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
|
@ -328,9 +328,9 @@ Clears the guard function, removing the ``Callable`` previously set by :ref:`set
|
|||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
bool **dispatch** **(** StringName p_event, Variant p_cargo=null **)**
|
||||
bool **dispatch** **(** StringName event, Variant cargo=null **)**
|
||||
|
||||
Recursively dispatches a state machine event named ``p_event`` with an optional argument ``p_cargo``. Returns ``true`` if the event was consumed.
|
||||
Recursively dispatches a state machine event named ``event`` with an optional argument ``cargo``. Returns ``true`` if the event was consumed.
|
||||
|
||||
Events propagate from the leaf state to the root state, and propagation stops as soon as any state consumes the event. States will consume the event if they have a related transition or event handler. For more information on event handlers, see :ref:`add_event_handler<class_LimboState_method_add_event_handler>`.
|
||||
|
||||
|
@ -366,7 +366,7 @@ Returns ``true`` if it is currently active, meaning it is the active substate of
|
|||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`LimboState<class_LimboState>` **named** **(** String p_name **)**
|
||||
:ref:`LimboState<class_LimboState>` **named** **(** String name **)**
|
||||
|
||||
A chained method for setting the name of this state.
|
||||
|
||||
|
@ -378,7 +378,7 @@ A chained method for setting the name of this state.
|
|||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
void **set_guard** **(** Callable p_guard_callable **)**
|
||||
void **set_guard** **(** Callable guard_callable **)**
|
||||
|
||||
Sets the guard function, which is a function called each time a transition to this state is considered. If the function returns ``false``, the transition will be disallowed.
|
||||
|
||||
|
|
|
@ -22,15 +22,15 @@ Methods
|
|||
.. table::
|
||||
:widths: auto
|
||||
|
||||
+-----------+-----------------------------------------------------------------------------------------------------------------+
|
||||
| String | :ref:`decorate_output_var<class_LimboUtility_method_decorate_output_var>` **(** String p_variable **)** |const| |
|
||||
+-----------+-----------------------------------------------------------------------------------------------------------------+
|
||||
| String | :ref:`decorate_var<class_LimboUtility_method_decorate_var>` **(** String p_variable **)** |const| |
|
||||
+-----------+-----------------------------------------------------------------------------------------------------------------+
|
||||
| String | :ref:`get_status_name<class_LimboUtility_method_get_status_name>` **(** int p_status **)** |const| |
|
||||
+-----------+-----------------------------------------------------------------------------------------------------------------+
|
||||
| Texture2D | :ref:`get_task_icon<class_LimboUtility_method_get_task_icon>` **(** String p_class_or_script_path **)** |const| |
|
||||
+-----------+-----------------------------------------------------------------------------------------------------------------+
|
||||
+-----------+---------------------------------------------------------------------------------------------------------------+
|
||||
| String | :ref:`decorate_output_var<class_LimboUtility_method_decorate_output_var>` **(** String variable **)** |const| |
|
||||
+-----------+---------------------------------------------------------------------------------------------------------------+
|
||||
| String | :ref:`decorate_var<class_LimboUtility_method_decorate_var>` **(** String variable **)** |const| |
|
||||
+-----------+---------------------------------------------------------------------------------------------------------------+
|
||||
| String | :ref:`get_status_name<class_LimboUtility_method_get_status_name>` **(** int status **)** |const| |
|
||||
+-----------+---------------------------------------------------------------------------------------------------------------+
|
||||
| Texture2D | :ref:`get_task_icon<class_LimboUtility_method_get_task_icon>` **(** String class_or_script_path **)** |const| |
|
||||
+-----------+---------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
.. rst-class:: classref-section-separator
|
||||
|
||||
|
@ -214,7 +214,7 @@ Method Descriptions
|
|||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
String **decorate_output_var** **(** String p_variable **)** |const|
|
||||
String **decorate_output_var** **(** String variable **)** |const|
|
||||
|
||||
Just like :ref:`decorate_var<class_LimboUtility_method_decorate_var>`, produces a string with a :ref:`Blackboard<class_Blackboard>` variable name that is formatted for display, and also adds an additional symbol to indicate that the variable is used as an output.
|
||||
|
||||
|
@ -226,7 +226,7 @@ Just like :ref:`decorate_var<class_LimboUtility_method_decorate_var>`, produces
|
|||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
String **decorate_var** **(** String p_variable **)** |const|
|
||||
String **decorate_var** **(** String variable **)** |const|
|
||||
|
||||
Produces a string with a :ref:`Blackboard<class_Blackboard>` variable name that is formatted for display or console output.
|
||||
|
||||
|
@ -238,7 +238,7 @@ Produces a string with a :ref:`Blackboard<class_Blackboard>` variable name that
|
|||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
String **get_status_name** **(** int p_status **)** |const|
|
||||
String **get_status_name** **(** int status **)** |const|
|
||||
|
||||
Returns a name of a :ref:`BTTask<class_BTTask>` status code.
|
||||
|
||||
|
@ -250,7 +250,7 @@ Returns a name of a :ref:`BTTask<class_BTTask>` status code.
|
|||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
Texture2D **get_task_icon** **(** String p_class_or_script_path **)** |const|
|
||||
Texture2D **get_task_icon** **(** String class_or_script_path **)** |const|
|
||||
|
||||
Returns the icon texture associated with a task based on its class name or script resource path.
|
||||
|
||||
|
|
|
@ -18,9 +18,9 @@
|
|||
</method>
|
||||
<method name="get_value">
|
||||
<return type="Variant" />
|
||||
<param index="0" name="p_agent" type="Object" />
|
||||
<param index="1" name="p_blackboard" type="Blackboard" />
|
||||
<param index="2" name="p_default" type="Variant" default="null" />
|
||||
<param index="0" name="agent" type="Object" />
|
||||
<param index="1" name="blackboard" type="Blackboard" />
|
||||
<param index="2" name="default" type="Variant" default="null" />
|
||||
<description>
|
||||
Returns the value of the parameter.
|
||||
</description>
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
</method>
|
||||
<method name="update">
|
||||
<return type="void" />
|
||||
<param index="0" name="p_delta" type="float" />
|
||||
<param index="0" name="delta" type="float" />
|
||||
<description>
|
||||
Executes the root task of the behavior tree instance if [member active] is [code]true[/code]. Call this method when [member update_mode] is set to [constant MANUAL]. When [member update_mode] is not [constant MANUAL], the [method update] will be called automatically. See [enum UpdateMode].
|
||||
</description>
|
||||
|
@ -61,17 +61,17 @@
|
|||
</members>
|
||||
<signals>
|
||||
<signal name="behavior_tree_finished">
|
||||
<param index="0" name="p_status" type="int" />
|
||||
<param index="0" name="status" type="int" />
|
||||
<description>
|
||||
Emitted when the behavior tree has finished executing and returned [code]SUCCESS[/code] or [code]FAILURE[/code].
|
||||
Argument [param p_status] holds the status returned by the behavior tree. See [enum BT.Status].
|
||||
Argument [param status] holds the status returned by the behavior tree. See [enum BT.Status].
|
||||
</description>
|
||||
</signal>
|
||||
<signal name="updated">
|
||||
<param index="0" name="p_status" type="int" />
|
||||
<param index="0" name="status" type="int" />
|
||||
<description>
|
||||
Emitted when BTPlayer has finished the behavior tree update.
|
||||
Argument [param p_status] holds the status returned by the behavior tree. See [enum BT.Status].
|
||||
Argument [param status] holds the status returned by the behavior tree. See [enum BT.Status].
|
||||
</description>
|
||||
</signal>
|
||||
</signals>
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
<methods>
|
||||
<method name="get_probability" qualifiers="const">
|
||||
<return type="float" />
|
||||
<param index="0" name="p_index" type="int" />
|
||||
<param index="0" name="child_idx" type="int" />
|
||||
<description>
|
||||
Returns the child task's selection probability.
|
||||
</description>
|
||||
|
@ -29,30 +29,30 @@
|
|||
</method>
|
||||
<method name="get_weight" qualifiers="const">
|
||||
<return type="float" />
|
||||
<param index="0" name="p_index" type="int" />
|
||||
<param index="0" name="child_idx" type="int" />
|
||||
<description>
|
||||
Returns the child task's weight within the weighted probability selection algorithm.
|
||||
</description>
|
||||
</method>
|
||||
<method name="has_probability" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<param index="0" name="p_index" type="int" />
|
||||
<param index="0" name="child_idx" type="int" />
|
||||
<description>
|
||||
Returns whether the child task at index [param p_index] participates within the weighted probability selection algorithm and has a probability assigned to it. Returns [code]false[/code] for [BTComment] tasks.
|
||||
Returns whether the child task at index [param child_idx] participates within the weighted probability selection algorithm and has a probability assigned to it. Returns [code]false[/code] for [BTComment] tasks.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_probability">
|
||||
<return type="void" />
|
||||
<param index="0" name="p_index" type="int" />
|
||||
<param index="1" name="p_probability" type="float" />
|
||||
<param index="0" name="child_idx" type="int" />
|
||||
<param index="1" name="probability" type="float" />
|
||||
<description>
|
||||
Sets the child task's weight calculated based on the desired probability.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_weight">
|
||||
<return type="void" />
|
||||
<param index="0" name="p_index" type="int" />
|
||||
<param index="1" name="p_weight" type="float" />
|
||||
<param index="0" name="child_idx" type="int" />
|
||||
<param index="1" name="weight" type="float" />
|
||||
<description>
|
||||
Sets the child task's weight for the weighted probability selection algorithm.
|
||||
</description>
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
</method>
|
||||
<method name="_tick" qualifiers="virtual">
|
||||
<return type="int" enum="BT.Status" />
|
||||
<param index="0" name="p_delta" type="float" />
|
||||
<param index="0" name="delta" type="float" />
|
||||
<description>
|
||||
Called when task is "ticked", i.e. executed by [BTPlayer] or [BTState] during an update.
|
||||
Returns execution status as defined in [enum BT.Status].
|
||||
|
@ -60,17 +60,17 @@
|
|||
</method>
|
||||
<method name="add_child">
|
||||
<return type="void" />
|
||||
<param index="0" name="p_child" type="BTTask" />
|
||||
<param index="0" name="task" type="BTTask" />
|
||||
<description>
|
||||
Adds a child task. The [param p_child] is placed at the end of the children list.
|
||||
Adds a child task. The [param task] is placed at the end of the children list.
|
||||
</description>
|
||||
</method>
|
||||
<method name="add_child_at_index">
|
||||
<return type="void" />
|
||||
<param index="0" name="p_child" type="BTTask" />
|
||||
<param index="1" name="p_idx" type="int" />
|
||||
<param index="0" name="task" type="BTTask" />
|
||||
<param index="1" name="idx" type="int" />
|
||||
<description>
|
||||
Adds a child task. The [param p_child] is placed at [param p_idx] position in the children list.
|
||||
Adds a child task. The [param task] is placed at [param idx] position in the children list.
|
||||
</description>
|
||||
</method>
|
||||
<method name="clone" qualifiers="const">
|
||||
|
@ -81,7 +81,7 @@
|
|||
</method>
|
||||
<method name="execute">
|
||||
<return type="int" enum="BT.Status" />
|
||||
<param index="0" name="p_delta" type="float" />
|
||||
<param index="0" name="delta" type="float" />
|
||||
<description>
|
||||
Performs task's execution. The execution follows a specific sequence:
|
||||
- If task's current [member status] is not [code]RUNNING[/code], the [method _enter] method is called first.
|
||||
|
@ -91,7 +91,7 @@
|
|||
</method>
|
||||
<method name="get_child" qualifiers="const">
|
||||
<return type="BTTask" />
|
||||
<param index="0" name="p_idx" type="int" />
|
||||
<param index="0" name="idx" type="int" />
|
||||
<description>
|
||||
Returns a child task by specifying its index.
|
||||
</description>
|
||||
|
@ -135,15 +135,15 @@
|
|||
</method>
|
||||
<method name="has_child" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<param index="0" name="p_child" type="BTTask" />
|
||||
<param index="0" name="task" type="BTTask" />
|
||||
<description>
|
||||
Returns [code]true[/code] if [param p_child] is a child of this task.
|
||||
Returns [code]true[/code] if [param task] is a child of this task.
|
||||
</description>
|
||||
</method>
|
||||
<method name="initialize">
|
||||
<return type="void" />
|
||||
<param index="0" name="p_agent" type="Node" />
|
||||
<param index="1" name="p_blackboard" type="Blackboard" />
|
||||
<param index="0" name="agent" type="Node" />
|
||||
<param index="1" name="blackboard" type="Blackboard" />
|
||||
<description>
|
||||
Initilizes the task. Assigns [member agent] and [member blackboard], and calls [method _setup] for the task and its children.
|
||||
The method is called recursively for each child task.
|
||||
|
@ -151,9 +151,9 @@
|
|||
</method>
|
||||
<method name="is_descendant_of" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<param index="0" name="p_task" type="BTTask" />
|
||||
<param index="0" name="task" type="BTTask" />
|
||||
<description>
|
||||
Returns [code]true[/code] if this task is a descendant of [param p_task]. In other words, this task must be a child of [param p_task] or one of its children or grandchildren.
|
||||
Returns [code]true[/code] if this task is a descendant of [param task]. In other words, this task must be a child of [param task] or one of its children or grandchildren.
|
||||
</description>
|
||||
</method>
|
||||
<method name="is_root" qualifiers="const">
|
||||
|
@ -171,21 +171,21 @@
|
|||
</method>
|
||||
<method name="print_tree">
|
||||
<return type="void" />
|
||||
<param index="0" name="p_initial_tabs" type="int" default="0" />
|
||||
<param index="0" name="initial_tabs" type="int" default="0" />
|
||||
<description>
|
||||
Prints the subtree that starts with this task to the console.
|
||||
</description>
|
||||
</method>
|
||||
<method name="remove_child">
|
||||
<return type="void" />
|
||||
<param index="0" name="p_child" type="BTTask" />
|
||||
<param index="0" name="task" type="BTTask" />
|
||||
<description>
|
||||
Removes [param p_child] task from children.
|
||||
Removes [param task] from children.
|
||||
</description>
|
||||
</method>
|
||||
<method name="remove_child_at_index">
|
||||
<return type="void" />
|
||||
<param index="0" name="p_idx" type="int" />
|
||||
<param index="0" name="idx" type="int" />
|
||||
<description>
|
||||
Removes a child task at a specified index from children.
|
||||
</description>
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
</method>
|
||||
<method name="copy_other">
|
||||
<return type="void" />
|
||||
<param index="0" name="p_other" type="BehaviorTree" />
|
||||
<param index="0" name="other" type="BehaviorTree" />
|
||||
<description>
|
||||
Become a copy of another behavior tree.
|
||||
</description>
|
||||
|
@ -36,15 +36,15 @@
|
|||
</method>
|
||||
<method name="instantiate" qualifiers="const">
|
||||
<return type="BTTask" />
|
||||
<param index="0" name="p_agent" type="Node" />
|
||||
<param index="1" name="p_blackboard" type="Blackboard" />
|
||||
<param index="0" name="agent" type="Node" />
|
||||
<param index="1" name="blackboard" type="Blackboard" />
|
||||
<description>
|
||||
Instantiates the Behavior Tree and returns the root [BTTask].
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_root_task">
|
||||
<return type="void" />
|
||||
<param index="0" name="p_value" type="BTTask" />
|
||||
<param index="0" name="task" type="BTTask" />
|
||||
<description>
|
||||
Assigns a new root task to the [BehaviorTree] resource.
|
||||
</description>
|
||||
|
|
|
@ -12,9 +12,9 @@
|
|||
<methods>
|
||||
<method name="create_from_tree_instance" qualifiers="static">
|
||||
<return type="BehaviorTreeData" />
|
||||
<param index="0" name="p_tree_instance" type="BTTask" />
|
||||
<param index="0" name="tree_instance" type="BTTask" />
|
||||
<description>
|
||||
Returns current state of the [param p_tree_instance] encoded as a [BehaviorTreeData], suitable for use with [BehaviorTreeView].
|
||||
Returns current state of the [param tree_instance] encoded as a [BehaviorTreeData], suitable for use with [BehaviorTreeView].
|
||||
Behavior tree instance can be acquired with [method BTPlayer.get_tree_instance].
|
||||
</description>
|
||||
</method>
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<methods>
|
||||
<method name="update_tree">
|
||||
<return type="void" />
|
||||
<param index="0" name="p_behavior_tree_data" type="BehaviorTreeData" />
|
||||
<param index="0" name="behavior_tree_data" type="BehaviorTreeData" />
|
||||
<description>
|
||||
Updates the representation of a [BehaviorTree] instance. See also [BehaviorTreeData].
|
||||
</description>
|
||||
|
@ -24,8 +24,8 @@
|
|||
</members>
|
||||
<signals>
|
||||
<signal name="task_selected">
|
||||
<param index="0" name="p_type_name" type="String" />
|
||||
<param index="1" name="p_script_path" type="String" />
|
||||
<param index="0" name="type_name" type="String" />
|
||||
<param index="1" name="script_path" type="String" />
|
||||
<description>
|
||||
Emitted when a task item is selected in [BehaviorTreeView].
|
||||
</description>
|
||||
|
|
|
@ -13,16 +13,16 @@
|
|||
<methods>
|
||||
<method name="bind_var_to_property">
|
||||
<return type="void" />
|
||||
<param index="0" name="p_name" type="StringName" />
|
||||
<param index="1" name="p_object" type="Object" />
|
||||
<param index="2" name="p_property" type="StringName" />
|
||||
<param index="0" name="var_name" type="StringName" />
|
||||
<param index="1" name="object" type="Object" />
|
||||
<param index="2" name="property" type="StringName" />
|
||||
<description>
|
||||
Establish a binding between a variable and the object's property specified by [param p_property] and [param p_object]. Changes to the variable update the property, and vice versa.
|
||||
Establish a binding between a variable and the object's property specified by [param property] and [param object]. Changes to the variable update the property, and vice versa.
|
||||
</description>
|
||||
</method>
|
||||
<method name="erase_var">
|
||||
<return type="void" />
|
||||
<param index="0" name="p_name" type="StringName" />
|
||||
<param index="0" name="var_name" type="StringName" />
|
||||
<description>
|
||||
Removes a variable by its name.
|
||||
</description>
|
||||
|
@ -35,38 +35,38 @@
|
|||
</method>
|
||||
<method name="get_var" qualifiers="const">
|
||||
<return type="Variant" />
|
||||
<param index="0" name="p_name" type="StringName" />
|
||||
<param index="1" name="p_default" type="Variant" default="null" />
|
||||
<param index="2" name="p_complain" type="bool" default="true" />
|
||||
<param index="0" name="var_name" type="StringName" />
|
||||
<param index="1" name="default" type="Variant" default="null" />
|
||||
<param index="2" name="complain" type="bool" default="true" />
|
||||
<description>
|
||||
Returns variable value or [param p_default] if variable doesn't exist. If [param p_complain] is [code]true[/code], an error will be printed if variable doesn't exist.
|
||||
Returns variable value or [param default] if variable doesn't exist. If [param complain] is [code]true[/code], an error will be printed if variable doesn't exist.
|
||||
</description>
|
||||
</method>
|
||||
<method name="has_var" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<param index="0" name="p_name" type="StringName" />
|
||||
<param index="0" name="var_name" type="StringName" />
|
||||
<description>
|
||||
Returns [code]true[/code] if the Blackboard contains the [param p_name] variable, including the parent scopes.
|
||||
Returns [code]true[/code] if the Blackboard contains the [param var_name] variable, including the parent scopes.
|
||||
</description>
|
||||
</method>
|
||||
<method name="prefetch_nodepath_vars">
|
||||
<return type="void" />
|
||||
<param index="0" name="p_node" type="Node" />
|
||||
<param index="0" name="node" type="Node" />
|
||||
<description>
|
||||
If [code]true[/code], any [NodePath] variables in the [Blackboard] are replaced with [Node] references when the tree is instantiated. References are retrieved by calling [method Node.get_node] on the agent instance.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_parent">
|
||||
<return type="void" />
|
||||
<param index="0" name="p_blackboard" type="Blackboard" />
|
||||
<param index="0" name="blackboard" type="Blackboard" />
|
||||
<description>
|
||||
Assigns the parent scope. If a value isn't in the current Blackboard scope, it will look in the parent scope Blackboard to find it.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_var">
|
||||
<return type="void" />
|
||||
<param index="0" name="p_name" type="StringName" />
|
||||
<param index="1" name="p_value" type="Variant" />
|
||||
<param index="0" name="var_name" type="StringName" />
|
||||
<param index="1" name="value" type="Variant" />
|
||||
<description>
|
||||
Assigns a value to a Blackboard variable.
|
||||
</description>
|
||||
|
@ -79,7 +79,7 @@
|
|||
</method>
|
||||
<method name="unbind_var">
|
||||
<return type="void" />
|
||||
<param index="0" name="p_name" type="StringName" />
|
||||
<param index="0" name="var_name" type="StringName" />
|
||||
<description>
|
||||
Remove binding from a variable.
|
||||
</description>
|
||||
|
|
|
@ -16,10 +16,10 @@
|
|||
</method>
|
||||
<method name="populate_blackboard">
|
||||
<return type="void" />
|
||||
<param index="0" name="p_blackboard" type="Blackboard" />
|
||||
<param index="1" name="p_overwrite" type="bool" />
|
||||
<param index="0" name="blackboard" type="Blackboard" />
|
||||
<param index="1" name="overwrite" type="bool" />
|
||||
<description>
|
||||
Populates [param p_blackboard] with the variables from this plan. If [param p_overwrite] is [code]true[/code], existing variables with the same names will be overwritten.
|
||||
Populates [param blackboard] with the variables from this plan. If [param overwrite] is [code]true[/code], existing variables with the same names will be overwritten.
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
|
|
|
@ -11,11 +11,11 @@
|
|||
<methods>
|
||||
<method name="add_transition">
|
||||
<return type="void" />
|
||||
<param index="0" name="p_from_state" type="LimboState" />
|
||||
<param index="1" name="p_to_state" type="LimboState" />
|
||||
<param index="2" name="p_event" type="StringName" />
|
||||
<param index="0" name="from_state" type="LimboState" />
|
||||
<param index="1" name="to_state" type="LimboState" />
|
||||
<param index="2" name="event" type="StringName" />
|
||||
<description>
|
||||
Establishes a transition from one state to another when [param p_event] is dispatched. Both [param p_from_state] and [param p_to_state] must be immediate children of this state.
|
||||
Establishes a transition from one state to another when [param event] is dispatched. Both [param from_state] and [param to_state] must be immediate children of this state.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_active_state" qualifiers="const">
|
||||
|
@ -32,22 +32,22 @@
|
|||
</method>
|
||||
<method name="initialize">
|
||||
<return type="void" />
|
||||
<param index="0" name="p_agent" type="Node" />
|
||||
<param index="1" name="p_parent_scope" type="Blackboard" default="null" />
|
||||
<param index="0" name="agent" type="Node" />
|
||||
<param index="1" name="parent_scope" type="Blackboard" default="null" />
|
||||
<description>
|
||||
Initiates the state and calls [method LimboState._setup] for both itself and all substates.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_active">
|
||||
<return type="void" />
|
||||
<param index="0" name="p_active" type="bool" />
|
||||
<param index="0" name="active" type="bool" />
|
||||
<description>
|
||||
When set to [code]true[/code], switches the state to [member initial_state] and activates state processing according to [member update_mode].
|
||||
</description>
|
||||
</method>
|
||||
<method name="update">
|
||||
<return type="void" />
|
||||
<param index="0" name="p_delta" type="float" />
|
||||
<param index="0" name="delta" type="float" />
|
||||
<description>
|
||||
Calls [method LimboState._update] on itself and the active substate, with the call cascading down to the leaf state. This method is automatically triggered if [member update_mode] is not set to [constant MANUAL].
|
||||
</description>
|
||||
|
@ -66,7 +66,7 @@
|
|||
</members>
|
||||
<signals>
|
||||
<signal name="state_changed">
|
||||
<param index="0" name="p_state" type="LimboState" />
|
||||
<param index="0" name="state" type="LimboState" />
|
||||
<description>
|
||||
Emitted when the currently active substate is switched to a different substate.
|
||||
</description>
|
||||
|
|
|
@ -31,38 +31,38 @@
|
|||
</method>
|
||||
<method name="_update" qualifiers="virtual">
|
||||
<return type="void" />
|
||||
<param index="0" name="p_delta" type="float" />
|
||||
<param index="0" name="delta" type="float" />
|
||||
<description>
|
||||
Called during the update. Implement your state's behavior with this method.
|
||||
</description>
|
||||
</method>
|
||||
<method name="add_event_handler">
|
||||
<return type="void" />
|
||||
<param index="0" name="p_event" type="StringName" />
|
||||
<param index="1" name="p_handler" type="Callable" />
|
||||
<param index="0" name="event" type="StringName" />
|
||||
<param index="1" name="handler" type="Callable" />
|
||||
<description>
|
||||
Registers a [param p_handler] to be called when [param p_event] is dispatched.
|
||||
Registers a [param handler] to be called when [param event] is dispatched.
|
||||
</description>
|
||||
</method>
|
||||
<method name="call_on_enter">
|
||||
<return type="LimboState" />
|
||||
<param index="0" name="p_callable" type="Callable" />
|
||||
<param index="0" name="callable" type="Callable" />
|
||||
<description>
|
||||
A chained method that connects the [signal entered] signal to a [param p_callable].
|
||||
A chained method that connects the [signal entered] signal to a [param callable].
|
||||
</description>
|
||||
</method>
|
||||
<method name="call_on_exit">
|
||||
<return type="LimboState" />
|
||||
<param index="0" name="p_callable" type="Callable" />
|
||||
<param index="0" name="callable" type="Callable" />
|
||||
<description>
|
||||
A chained method that connects the [signal exited] signal to a [param p_callable].
|
||||
A chained method that connects the [signal exited] signal to a [param callable].
|
||||
</description>
|
||||
</method>
|
||||
<method name="call_on_update">
|
||||
<return type="LimboState" />
|
||||
<param index="0" name="p_callable" type="Callable" />
|
||||
<param index="0" name="callable" type="Callable" />
|
||||
<description>
|
||||
A chained method that connects the [signal updated] signal to a [param p_callable].
|
||||
A chained method that connects the [signal updated] signal to a [param callable].
|
||||
</description>
|
||||
</method>
|
||||
<method name="clear_guard">
|
||||
|
@ -73,10 +73,10 @@
|
|||
</method>
|
||||
<method name="dispatch">
|
||||
<return type="bool" />
|
||||
<param index="0" name="p_event" type="StringName" />
|
||||
<param index="1" name="p_cargo" type="Variant" default="null" />
|
||||
<param index="0" name="event" type="StringName" />
|
||||
<param index="1" name="cargo" type="Variant" default="null" />
|
||||
<description>
|
||||
Recursively dispatches a state machine event named [param p_event] with an optional argument [param p_cargo]. Returns [code]true[/code] if the event was consumed.
|
||||
Recursively dispatches a state machine event named [param event] with an optional argument [param cargo]. Returns [code]true[/code] if the event was consumed.
|
||||
Events propagate from the leaf state to the root state, and propagation stops as soon as any state consumes the event. States will consume the event if they have a related transition or event handler. For more information on event handlers, see [method add_event_handler].
|
||||
</description>
|
||||
</method>
|
||||
|
@ -94,14 +94,14 @@
|
|||
</method>
|
||||
<method name="named">
|
||||
<return type="LimboState" />
|
||||
<param index="0" name="p_name" type="String" />
|
||||
<param index="0" name="name" type="String" />
|
||||
<description>
|
||||
A chained method for setting the name of this state.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_guard">
|
||||
<return type="void" />
|
||||
<param index="0" name="p_guard_callable" type="Callable" />
|
||||
<param index="0" name="guard_callable" type="Callable" />
|
||||
<description>
|
||||
Sets the guard function, which is a function called each time a transition to this state is considered. If the function returns [code]false[/code], the transition will be disallowed.
|
||||
</description>
|
||||
|
@ -138,7 +138,7 @@
|
|||
</description>
|
||||
</signal>
|
||||
<signal name="updated">
|
||||
<param index="0" name="p_delta" type="float" />
|
||||
<param index="0" name="delta" type="float" />
|
||||
<description>
|
||||
Emitted when the state is updated.
|
||||
</description>
|
||||
|
|
|
@ -10,28 +10,28 @@
|
|||
<methods>
|
||||
<method name="decorate_output_var" qualifiers="const">
|
||||
<return type="String" />
|
||||
<param index="0" name="p_variable" type="String" />
|
||||
<param index="0" name="variable" type="String" />
|
||||
<description>
|
||||
Just like [method decorate_var], produces a string with a [Blackboard] variable name that is formatted for display, and also adds an additional symbol to indicate that the variable is used as an output.
|
||||
</description>
|
||||
</method>
|
||||
<method name="decorate_var" qualifiers="const">
|
||||
<return type="String" />
|
||||
<param index="0" name="p_variable" type="String" />
|
||||
<param index="0" name="variable" type="String" />
|
||||
<description>
|
||||
Produces a string with a [Blackboard] variable name that is formatted for display or console output.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_status_name" qualifiers="const">
|
||||
<return type="String" />
|
||||
<param index="0" name="p_status" type="int" />
|
||||
<param index="0" name="status" type="int" />
|
||||
<description>
|
||||
Returns a name of a [BTTask] status code.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_task_icon" qualifiers="const">
|
||||
<return type="Texture2D" />
|
||||
<param index="0" name="p_class_or_script_path" type="String" />
|
||||
<param index="0" name="class_or_script_path" type="String" />
|
||||
<description>
|
||||
Returns the icon texture associated with a task based on its class name or script resource path.
|
||||
</description>
|
||||
|
|
|
@ -74,7 +74,7 @@ void ActionBanner::_notification(int p_what) {
|
|||
}
|
||||
|
||||
void ActionBanner::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("_execute_action", "p_action", "p_auto_close"), &ActionBanner::_execute_action);
|
||||
ClassDB::bind_method(D_METHOD("_execute_action", "action", "auto_close"), &ActionBanner::_execute_action);
|
||||
}
|
||||
|
||||
ActionBanner::ActionBanner() {
|
||||
|
|
|
@ -117,7 +117,7 @@ Ref<BehaviorTreeData> BehaviorTreeData::create_from_tree_instance(const Ref<BTTa
|
|||
void BehaviorTreeData::_bind_methods() {
|
||||
// ClassDB::bind_static_method("BehaviorTreeData", D_METHOD("serialize", "p_tree_instance", "p_player_path", "p_bt_resource_path"), &BehaviorTreeData::serialize);
|
||||
// ClassDB::bind_static_method("BehaviorTreeData", D_METHOD("deserialize", "p_array"), &BehaviorTreeData::deserialize);
|
||||
ClassDB::bind_static_method("BehaviorTreeData", D_METHOD("create_from_tree_instance", "p_tree_instance"), &BehaviorTreeData::create_from_tree_instance);
|
||||
ClassDB::bind_static_method("BehaviorTreeData", D_METHOD("create_from_tree_instance", "tree_instance"), &BehaviorTreeData::create_from_tree_instance);
|
||||
}
|
||||
|
||||
BehaviorTreeData::BehaviorTreeData() {
|
||||
|
|
|
@ -311,13 +311,13 @@ void BehaviorTreeView::_bind_methods() {
|
|||
ClassDB::bind_method(D_METHOD("_draw_success_status"), &BehaviorTreeView::_draw_success_status);
|
||||
ClassDB::bind_method(D_METHOD("_draw_failure_status"), &BehaviorTreeView::_draw_failure_status);
|
||||
ClassDB::bind_method(D_METHOD("_item_collapsed"), &BehaviorTreeView::_item_collapsed);
|
||||
ClassDB::bind_method(D_METHOD("update_tree", "p_behavior_tree_data"), &BehaviorTreeView::update_tree);
|
||||
ClassDB::bind_method(D_METHOD("update_tree", "behavior_tree_data"), &BehaviorTreeView::update_tree);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("set_update_interval_msec", "p_milliseconds"), &BehaviorTreeView::set_update_interval_msec);
|
||||
ClassDB::bind_method(D_METHOD("set_update_interval_msec", "interval_msec"), &BehaviorTreeView::set_update_interval_msec);
|
||||
ClassDB::bind_method(D_METHOD("get_update_interval_msec"), &BehaviorTreeView::get_update_interval_msec);
|
||||
ADD_PROPERTY(PropertyInfo(Variant::INT, "update_interval_msec"), "set_update_interval_msec", "get_update_interval_msec");
|
||||
|
||||
ADD_SIGNAL(MethodInfo("task_selected", PropertyInfo(Variant::STRING, "p_type_name"), PropertyInfo(Variant::STRING, "p_script_path")));
|
||||
ADD_SIGNAL(MethodInfo("task_selected", PropertyInfo(Variant::STRING, "type_name"), PropertyInfo(Variant::STRING, "script_path")));
|
||||
}
|
||||
|
||||
BehaviorTreeView::BehaviorTreeView() {
|
||||
|
|
|
@ -68,8 +68,8 @@ void LimboDebugger::_bind_methods() {
|
|||
#ifdef LIMBOAI_GDEXTENSION
|
||||
ClassDB::bind_method(D_METHOD("parse_message_gdext"), &LimboDebugger::parse_message_gdext);
|
||||
#endif
|
||||
ClassDB::bind_method(D_METHOD("_on_bt_updated", "p_status", "p_path"), &LimboDebugger::_on_bt_updated);
|
||||
ClassDB::bind_method(D_METHOD("_on_state_updated", "p_delta", "p_path"), &LimboDebugger::_on_state_updated);
|
||||
ClassDB::bind_method(D_METHOD("_on_bt_updated", "status", "path"), &LimboDebugger::_on_bt_updated);
|
||||
ClassDB::bind_method(D_METHOD("_on_state_updated", "delta", "path"), &LimboDebugger::_on_state_updated);
|
||||
#endif // ! DEBUG_ENABLED
|
||||
}
|
||||
|
||||
|
|
|
@ -1184,16 +1184,16 @@ void LimboAIEditor::_notification(int p_what) {
|
|||
}
|
||||
|
||||
void LimboAIEditor::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("_add_task", "p_task"), &LimboAIEditor::_add_task);
|
||||
ClassDB::bind_method(D_METHOD("_remove_task", "p_task"), &LimboAIEditor::_remove_task);
|
||||
ClassDB::bind_method(D_METHOD("_add_task_with_prototype", "p_prototype"), &LimboAIEditor::_add_task_with_prototype);
|
||||
ClassDB::bind_method(D_METHOD("_add_task", "task"), &LimboAIEditor::_add_task);
|
||||
ClassDB::bind_method(D_METHOD("_remove_task", "task"), &LimboAIEditor::_remove_task);
|
||||
ClassDB::bind_method(D_METHOD("_add_task_with_prototype", "prototype_task"), &LimboAIEditor::_add_task_with_prototype);
|
||||
ClassDB::bind_method(D_METHOD("_new_bt"), &LimboAIEditor::_new_bt);
|
||||
ClassDB::bind_method(D_METHOD("_save_bt", "p_path"), &LimboAIEditor::_save_bt);
|
||||
ClassDB::bind_method(D_METHOD("_load_bt", "p_path"), &LimboAIEditor::_load_bt);
|
||||
ClassDB::bind_method(D_METHOD("edit_bt", "p_behavior_tree", "p_force_refresh"), &LimboAIEditor::edit_bt, Variant(false));
|
||||
ClassDB::bind_method(D_METHOD("_save_bt", "path"), &LimboAIEditor::_save_bt);
|
||||
ClassDB::bind_method(D_METHOD("_load_bt", "path"), &LimboAIEditor::_load_bt);
|
||||
ClassDB::bind_method(D_METHOD("edit_bt", "behavior_tree", "force_refresh"), &LimboAIEditor::edit_bt, Variant(false));
|
||||
ClassDB::bind_method(D_METHOD("_reload_modified"), &LimboAIEditor::_reload_modified);
|
||||
ClassDB::bind_method(D_METHOD("_resave_modified"), &LimboAIEditor::_resave_modified);
|
||||
ClassDB::bind_method(D_METHOD("_replace_task", "p_task", "p_by_task"), &LimboAIEditor::_replace_task);
|
||||
ClassDB::bind_method(D_METHOD("_replace_task", "task", "by_task"), &LimboAIEditor::_replace_task);
|
||||
ClassDB::bind_method(D_METHOD("_popup_file_dialog"), &LimboAIEditor::_popup_file_dialog);
|
||||
ClassDB::bind_method(D_METHOD("get_edited_blackboard_plan"), &LimboAIEditor::get_edited_blackboard_plan);
|
||||
}
|
||||
|
|
|
@ -74,9 +74,9 @@ void ModeSwitchButton::_notification(int p_what) {
|
|||
}
|
||||
|
||||
void ModeSwitchButton::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("add_mode", "p_id", "p_icon", "p_tooltip"), &ModeSwitchButton::add_mode);
|
||||
ClassDB::bind_method(D_METHOD("add_mode", "id", "icon", "tooltip"), &ModeSwitchButton::add_mode);
|
||||
ClassDB::bind_method(D_METHOD("get_mode"), &ModeSwitchButton::get_mode);
|
||||
ClassDB::bind_method(D_METHOD("set_mode", "p_id"), &ModeSwitchButton::set_mode);
|
||||
ClassDB::bind_method(D_METHOD("set_mode", "id"), &ModeSwitchButton::set_mode);
|
||||
ClassDB::bind_method(D_METHOD("next_mode"), &ModeSwitchButton::next_mode);
|
||||
|
||||
ADD_SIGNAL(MethodInfo("mode_changed"));
|
||||
|
|
|
@ -396,10 +396,10 @@ void TaskTree::_notification(int p_what) {
|
|||
}
|
||||
|
||||
void TaskTree::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("load_bt", "p_behavior_tree"), &TaskTree::load_bt);
|
||||
ClassDB::bind_method(D_METHOD("load_bt", "behavior_tree"), &TaskTree::load_bt);
|
||||
ClassDB::bind_method(D_METHOD("get_bt"), &TaskTree::get_bt);
|
||||
ClassDB::bind_method(D_METHOD("update_tree"), &TaskTree::update_tree);
|
||||
ClassDB::bind_method(D_METHOD("update_task", "p_task"), &TaskTree::update_task);
|
||||
ClassDB::bind_method(D_METHOD("update_task", "task"), &TaskTree::update_task);
|
||||
ClassDB::bind_method(D_METHOD("get_selected"), &TaskTree::get_selected);
|
||||
ClassDB::bind_method(D_METHOD("deselect"), &TaskTree::deselect);
|
||||
|
||||
|
@ -413,9 +413,9 @@ void TaskTree::_bind_methods() {
|
|||
ADD_SIGNAL(MethodInfo("task_activated"));
|
||||
ADD_SIGNAL(MethodInfo("probability_clicked"));
|
||||
ADD_SIGNAL(MethodInfo("task_dragged",
|
||||
PropertyInfo(Variant::OBJECT, "p_task", PROPERTY_HINT_RESOURCE_TYPE, "BTTask"),
|
||||
PropertyInfo(Variant::OBJECT, "p_to_task", PROPERTY_HINT_RESOURCE_TYPE, "BTTask"),
|
||||
PropertyInfo(Variant::INT, "p_type")));
|
||||
PropertyInfo(Variant::OBJECT, "task", PROPERTY_HINT_RESOURCE_TYPE, "BTTask"),
|
||||
PropertyInfo(Variant::OBJECT, "to_task", PROPERTY_HINT_RESOURCE_TYPE, "BTTask"),
|
||||
PropertyInfo(Variant::INT, "type")));
|
||||
}
|
||||
|
||||
TaskTree::TaskTree() {
|
||||
|
|
|
@ -240,20 +240,20 @@ void LimboHSM::_notification(int p_what) {
|
|||
}
|
||||
|
||||
void LimboHSM::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("set_update_mode", "p_mode"), &LimboHSM::set_update_mode);
|
||||
ClassDB::bind_method(D_METHOD("set_update_mode", "mode"), &LimboHSM::set_update_mode);
|
||||
ClassDB::bind_method(D_METHOD("get_update_mode"), &LimboHSM::get_update_mode);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("set_initial_state", "p_state"), &LimboHSM::set_initial_state);
|
||||
ClassDB::bind_method(D_METHOD("set_initial_state", "state"), &LimboHSM::set_initial_state);
|
||||
ClassDB::bind_method(D_METHOD("get_initial_state"), &LimboHSM::get_initial_state);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("get_active_state"), &LimboHSM::get_active_state);
|
||||
ClassDB::bind_method(D_METHOD("get_leaf_state"), &LimboHSM::get_leaf_state);
|
||||
ClassDB::bind_method(D_METHOD("set_active", "p_active"), &LimboHSM::set_active);
|
||||
ClassDB::bind_method(D_METHOD("update", "p_delta"), &LimboHSM::update);
|
||||
ClassDB::bind_method(D_METHOD("add_transition", "p_from_state", "p_to_state", "p_event"), &LimboHSM::add_transition);
|
||||
ClassDB::bind_method(D_METHOD("set_active", "active"), &LimboHSM::set_active);
|
||||
ClassDB::bind_method(D_METHOD("update", "delta"), &LimboHSM::update);
|
||||
ClassDB::bind_method(D_METHOD("add_transition", "from_state", "to_state", "event"), &LimboHSM::add_transition);
|
||||
ClassDB::bind_method(D_METHOD("anystate"), &LimboHSM::anystate);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("initialize", "p_agent", "p_parent_scope"), &LimboHSM::initialize, Variant());
|
||||
ClassDB::bind_method(D_METHOD("initialize", "agent", "parent_scope"), &LimboHSM::initialize, Variant());
|
||||
|
||||
BIND_ENUM_CONSTANT(IDLE);
|
||||
BIND_ENUM_CONSTANT(PHYSICS);
|
||||
|
@ -263,7 +263,7 @@ void LimboHSM::_bind_methods() {
|
|||
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "ANYSTATE", PROPERTY_HINT_RESOURCE_TYPE, "LimboState", 0), "", "anystate");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "initial_state", PROPERTY_HINT_RESOURCE_TYPE, "LimboState", 0), "set_initial_state", "get_initial_state");
|
||||
|
||||
ADD_SIGNAL(MethodInfo("state_changed", PropertyInfo(Variant::OBJECT, "p_state", PROPERTY_HINT_RESOURCE_TYPE, "LimboState", 0)));
|
||||
ADD_SIGNAL(MethodInfo("state_changed", PropertyInfo(Variant::OBJECT, "state", PROPERTY_HINT_RESOURCE_TYPE, "LimboState", 0)));
|
||||
}
|
||||
|
||||
LimboHSM::LimboHSM() {
|
||||
|
|
|
@ -170,28 +170,28 @@ void LimboState::_notification(int p_what) {
|
|||
void LimboState::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("get_root"), &LimboState::get_root);
|
||||
ClassDB::bind_method(D_METHOD("get_agent"), &LimboState::get_agent);
|
||||
ClassDB::bind_method(D_METHOD("set_agent", "p_agent"), &LimboState::set_agent);
|
||||
ClassDB::bind_method(D_METHOD("set_agent", "agent"), &LimboState::set_agent);
|
||||
ClassDB::bind_method(D_METHOD("event_finished"), &LimboState::event_finished);
|
||||
ClassDB::bind_method(D_METHOD("is_active"), &LimboState::is_active);
|
||||
ClassDB::bind_method(D_METHOD("_initialize", "p_agent", "p_blackboard"), &LimboState::_initialize);
|
||||
ClassDB::bind_method(D_METHOD("dispatch", "p_event", "p_cargo"), &LimboState::dispatch, Variant());
|
||||
ClassDB::bind_method(D_METHOD("named", "p_name"), &LimboState::named);
|
||||
ClassDB::bind_method(D_METHOD("add_event_handler", "p_event", "p_handler"), &LimboState::add_event_handler);
|
||||
ClassDB::bind_method(D_METHOD("call_on_enter", "p_callable"), &LimboState::call_on_enter);
|
||||
ClassDB::bind_method(D_METHOD("call_on_exit", "p_callable"), &LimboState::call_on_exit);
|
||||
ClassDB::bind_method(D_METHOD("call_on_update", "p_callable"), &LimboState::call_on_update);
|
||||
ClassDB::bind_method(D_METHOD("set_guard", "p_guard_callable"), &LimboState::set_guard);
|
||||
ClassDB::bind_method(D_METHOD("_initialize", "agent", "blackboard"), &LimboState::_initialize);
|
||||
ClassDB::bind_method(D_METHOD("dispatch", "event", "cargo"), &LimboState::dispatch, Variant());
|
||||
ClassDB::bind_method(D_METHOD("named", "name"), &LimboState::named);
|
||||
ClassDB::bind_method(D_METHOD("add_event_handler", "event", "handler"), &LimboState::add_event_handler);
|
||||
ClassDB::bind_method(D_METHOD("call_on_enter", "callable"), &LimboState::call_on_enter);
|
||||
ClassDB::bind_method(D_METHOD("call_on_exit", "callable"), &LimboState::call_on_exit);
|
||||
ClassDB::bind_method(D_METHOD("call_on_update", "callable"), &LimboState::call_on_update);
|
||||
ClassDB::bind_method(D_METHOD("set_guard", "guard_callable"), &LimboState::set_guard);
|
||||
ClassDB::bind_method(D_METHOD("clear_guard"), &LimboState::clear_guard);
|
||||
ClassDB::bind_method(D_METHOD("get_blackboard"), &LimboState::get_blackboard);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("set_blackboard_plan", "p_plan"), &LimboState::set_blackboard_plan);
|
||||
ClassDB::bind_method(D_METHOD("set_blackboard_plan", "plan"), &LimboState::set_blackboard_plan);
|
||||
ClassDB::bind_method(D_METHOD("get_blackboard_plan"), &LimboState::get_blackboard_plan);
|
||||
|
||||
#ifdef LIMBOAI_MODULE
|
||||
GDVIRTUAL_BIND(_setup);
|
||||
GDVIRTUAL_BIND(_enter);
|
||||
GDVIRTUAL_BIND(_exit);
|
||||
GDVIRTUAL_BIND(_update, "p_delta");
|
||||
GDVIRTUAL_BIND(_update, "delta");
|
||||
#elif LIMBOAI_GDEXTENSION
|
||||
// TODO: Registering virtual functions is not available in godot-cpp...
|
||||
#endif
|
||||
|
@ -204,7 +204,7 @@ void LimboState::_bind_methods() {
|
|||
ADD_SIGNAL(MethodInfo("setup"));
|
||||
ADD_SIGNAL(MethodInfo("entered"));
|
||||
ADD_SIGNAL(MethodInfo("exited"));
|
||||
ADD_SIGNAL(MethodInfo("updated", PropertyInfo(Variant::FLOAT, "p_delta")));
|
||||
ADD_SIGNAL(MethodInfo("updated", PropertyInfo(Variant::FLOAT, "delta")));
|
||||
}
|
||||
|
||||
LimboState::LimboState() {
|
||||
|
|
|
@ -604,10 +604,10 @@ void LimboUtility::open_doc_class(const String &p_class_name) {
|
|||
#endif // ! TOOLS_ENABLED
|
||||
|
||||
void LimboUtility::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("decorate_var", "p_variable"), &LimboUtility::decorate_var);
|
||||
ClassDB::bind_method(D_METHOD("decorate_output_var", "p_variable"), &LimboUtility::decorate_output_var);
|
||||
ClassDB::bind_method(D_METHOD("get_status_name", "p_status"), &LimboUtility::get_status_name);
|
||||
ClassDB::bind_method(D_METHOD("get_task_icon", "p_class_or_script_path"), &LimboUtility::get_task_icon);
|
||||
ClassDB::bind_method(D_METHOD("decorate_var", "variable"), &LimboUtility::decorate_var);
|
||||
ClassDB::bind_method(D_METHOD("decorate_output_var", "variable"), &LimboUtility::decorate_output_var);
|
||||
ClassDB::bind_method(D_METHOD("get_status_name", "status"), &LimboUtility::get_status_name);
|
||||
ClassDB::bind_method(D_METHOD("get_task_icon", "class_or_script_path"), &LimboUtility::get_task_icon);
|
||||
|
||||
BIND_ENUM_CONSTANT(CHECK_EQUAL);
|
||||
BIND_ENUM_CONSTANT(CHECK_LESS_THAN);
|
||||
|
|
Loading…
Reference in New Issue