forked from bit/DotRecastNetSim
test remove all obstacle
This commit is contained in:
parent
1cb03e2c5f
commit
e590ca0dba
|
@ -33,6 +33,15 @@ namespace DotRecast.Recast.Toolset.Tools
|
||||||
{
|
{
|
||||||
if (null == _tc)
|
if (null == _tc)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
for (int i = 0; i < _tc.GetObstacleCount(); ++i)
|
||||||
|
{
|
||||||
|
DtTileCacheObstacle ob = _tc.GetObstacle(i);
|
||||||
|
if (ob.state == DtObstacleState.DT_OBSTACLE_EMPTY)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
_tc.RemoveObstacle(_tc.GetObstacleRef(ob));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RemoveTempObstacle(RcVec3f sp, RcVec3f sq)
|
public void RemoveTempObstacle(RcVec3f sp, RcVec3f sq)
|
||||||
|
@ -48,7 +57,7 @@ namespace DotRecast.Recast.Toolset.Tools
|
||||||
{
|
{
|
||||||
if (null == _tc)
|
if (null == _tc)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
p.y -= 0.5f;
|
p.y -= 0.5f;
|
||||||
return _tc.AddObstacle(p, 1.0f, 2.0f);
|
return _tc.AddObstacle(p, 1.0f, 2.0f);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue