MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / propagate_call

Method propagate_call

scene/main/node.cpp:2618–2635  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2616}
2617
2618void Node::propagate_call(const StringName &p_method, const Array &p_args, const bool p_parent_first) {
2619 ERR_THREAD_GUARD
2620 data.blocked++;
2621
2622 if (p_parent_first && has_method(p_method)) {
2623 callv(p_method, p_args);
2624 }
2625
2626 for (KeyValue<StringName, Node *> &K : data.children) {
2627 K.value->propagate_call(p_method, p_args, p_parent_first);
2628 }
2629
2630 if (!p_parent_first && has_method(p_method)) {
2631 callv(p_method, p_args);
2632 }
2633
2634 data.blocked--;
2635}
2636
2637void Node::_propagate_replace_owner(Node *p_owner, Node *p_by_owner) {
2638 if (get_owner() == p_owner) {

Calls 1

has_methodFunction · 0.85

Tested by

no test coverage detected