forked from bit/DotRecastNetSim
readonly struct ObstacleRequest
This commit is contained in:
parent
95fd9fa872
commit
729aee68c7
|
@ -385,9 +385,7 @@ namespace DotRecast.Detour.TileCache
|
||||||
|
|
||||||
private ObstacleRequest AddObstacleRequest(DtTileCacheObstacle ob)
|
private ObstacleRequest AddObstacleRequest(DtTileCacheObstacle ob)
|
||||||
{
|
{
|
||||||
ObstacleRequest req = new ObstacleRequest();
|
ObstacleRequest req = new ObstacleRequest(ObstacleRequestAction.REQUEST_ADD, GetObstacleRef(ob));
|
||||||
req.action = ObstacleRequestAction.REQUEST_ADD;
|
|
||||||
req.refs = GetObstacleRef(ob);
|
|
||||||
m_reqs.Add(req);
|
m_reqs.Add(req);
|
||||||
return req;
|
return req;
|
||||||
}
|
}
|
||||||
|
@ -399,9 +397,7 @@ namespace DotRecast.Detour.TileCache
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ObstacleRequest req = new ObstacleRequest();
|
ObstacleRequest req = new ObstacleRequest(ObstacleRequestAction.REQUEST_REMOVE, refs);
|
||||||
req.action = ObstacleRequestAction.REQUEST_REMOVE;
|
|
||||||
req.refs = refs;
|
|
||||||
m_reqs.Add(req);
|
m_reqs.Add(req);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,9 +20,15 @@ freely, subject to the following restrictions:
|
||||||
|
|
||||||
namespace DotRecast.Detour.TileCache
|
namespace DotRecast.Detour.TileCache
|
||||||
{
|
{
|
||||||
public class ObstacleRequest
|
public readonly struct ObstacleRequest
|
||||||
{
|
{
|
||||||
public ObstacleRequestAction action;
|
public readonly ObstacleRequestAction action;
|
||||||
public long refs;
|
public readonly long refs;
|
||||||
|
|
||||||
|
public ObstacleRequest(ObstacleRequestAction action, long refs)
|
||||||
|
{
|
||||||
|
this.action = action;
|
||||||
|
this.refs = refs;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue