MCPcopy Create free account
hub / github.com/axmolengine/axmol / addNavMeshObstacle

Method addNavMeshObstacle

core/navmesh/NavMesh.cpp:425–434  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

423}
424
425void NavMesh::addNavMeshObstacle(NavMeshObstacle* obstacle)
426{
427 auto iter = std::find(_obstacleList.begin(), _obstacleList.end(), nullptr);
428 if (iter != _obstacleList.end())
429 {
430 obstacle->addTo(_tileCache);
431 obstacle->retain();
432 _obstacleList[iter - _obstacleList.begin()] = obstacle;
433 }
434}
435
436void NavMesh::removeNavMeshAgent(NavMeshAgent* agent)
437{

Callers 2

onEnterMethod · 0.80

Calls 5

findFunction · 0.50
beginMethod · 0.45
endMethod · 0.45
addToMethod · 0.45
retainMethod · 0.45

Tested by

no test coverage detected