Exemplo n.º 1
0
            public bool Update(Cell c)
            {
                var x = c.matrixPosX;
                var z = c.matrixPosZ;

                if (_lastCoverage.Contains(x, z) && !_newCoverage.Contains(x, z))
                {
                    return(c.RemoveDynamicObstacle(_parent));
                }
                else if (!_lastCoverage.Contains(x, z) && _newCoverage.Contains(x, z))
                {
                    return(c.AddDynamicObstacle(_parent));
                }

                return(false);
            }
Exemplo n.º 2
0
 /// <summary>
 /// Checks if the specified cell is se4rvices by this portal, i.e. if this portal is usable from the cell.
 /// </summary>
 /// <param name="cell">The cell.</param>
 /// <returns><see langword="true"/> if the portal is usable from the cell; otherwise <see langword="false"/></returns>
 public bool Services(IGridCell cell)
 {
     return(_matrixBounds.Contains(cell.matrixPosX, cell.matrixPosZ));
 }