MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / ResetLogic

Method ResetLogic

Source/Engine/AI/Behavior.cpp:154–169  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

152}
153
154void 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
171void Behavior::OnEnable()
172{

Callers

nothing calls this directly

Calls 1

FreeMemoryMethod · 0.45

Tested by

no test coverage detected