| 121 | } |
| 122 | |
| 123 | void Behavior::StartLogic() |
| 124 | { |
| 125 | if (_result == BehaviorUpdateResult::Running) |
| 126 | return; |
| 127 | PROFILE_CPU(); |
| 128 | |
| 129 | // Ensure to have tree loaded on play |
| 130 | CHECK(Tree && !Tree->WaitForLoaded()); |
| 131 | BehaviorTree* tree = Tree.Get(); |
| 132 | CHECK(tree->Graph.Root); |
| 133 | |
| 134 | // Setup state |
| 135 | _result = BehaviorUpdateResult::Running; |
| 136 | _accumulatedTime = 0.0f; |
| 137 | _totalTime = 0; |
| 138 | |
| 139 | // Init knowledge |
| 140 | _knowledge.InitMemory(tree); |
| 141 | } |
| 142 | |
| 143 | void Behavior::StopLogic(BehaviorUpdateResult result) |
| 144 | { |
nothing calls this directly
no test coverage detected