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

Method AddGoal

Source/Engine/AI/BehaviorKnowledge.cpp:228–239  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

226}
227
228void BehaviorKnowledge::AddGoal(Variant&& goal)
229{
230 int32 i = 0;
231 for (; i < Goals.Count(); i++)
232 {
233 if (Goals[i].Type == goal.Type)
234 break;
235 }
236 if (i == Goals.Count())
237 Goals.AddDefault();
238 Goals.Get()[i] = MoveTemp(goal);
239}
240
241void BehaviorKnowledge::RemoveGoal(ScriptingTypeHandle type)
242{

Callers 1

InitializeMethod · 0.80

Calls 3

CountMethod · 0.45
AddDefaultMethod · 0.45
GetMethod · 0.45

Tested by

no test coverage detected