MCPcopy Create free account
hub / github.com/IppClub/Dora-SSR / setDecisionTreeName

Method setDecisionTreeName

Source/Platformer/Unit.cpp:423–432  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

421}
422
423void Unit::setDecisionTreeName(String name) {
424 _decisionTreeName = name.toString();
425 const auto& item = SharedData.getStore()->get(_decisionTreeName);
426 if (item) {
427 Decision::Leaf* leaf = item->as<Decision::Leaf>();
428 WarnIf(leaf == nullptr, "decision tree \"{}\" not found", _decisionTreeName);
429 _behaviorTree = nullptr;
430 _decisionTree = leaf;
431 }
432}
433
434const std::string& Unit::getDecisionTreeName() const noexcept {
435 return _decisionTreeName;

Callers 1

Calls 3

getStoreMethod · 0.80
toStringMethod · 0.65
getMethod · 0.65

Tested by

no test coverage detected