| 152 | } |
| 153 | |
| 154 | void Behavior::ResetLogic() |
| 155 | { |
| 156 | PROFILE_CPU(); |
| 157 | const bool isActive = _result == BehaviorUpdateResult::Running; |
| 158 | if (isActive) |
| 159 | StopLogic(); |
| 160 | |
| 161 | // Reset state |
| 162 | _knowledge.FreeMemory(); |
| 163 | _accumulatedTime = 0.0f; |
| 164 | _totalTime = 0; |
| 165 | _result = BehaviorUpdateResult::Success; |
| 166 | |
| 167 | if (isActive) |
| 168 | StartLogic(); |
| 169 | } |
| 170 | |
| 171 | void Behavior::OnEnable() |
| 172 | { |
nothing calls this directly
no test coverage detected