private void MarkObstacleArea(List <Vector3> pts, CellManager cellMgr, byte obstacle) { List <CellPos> cells = cellMgr.GetCellsInPolygon(pts); foreach (CellPos cell in cells) { cellMgr.SetCellStatus(cell.row, cell.col, obstacle); } }
private void MarkLevelArea(List <Vector3> pts, CellManager cellMgr, byte level) { List <CellPos> cells = cellMgr.GetCellsInPolygon(pts); foreach (CellPos cell in cells) { byte status = cellMgr.GetCellStatus(cell.row, cell.col); byte typeAndSubType = BlockType.GetBlockTypeWithoutLevel(status); cellMgr.SetCellStatus(cell.row, cell.col, (byte)(typeAndSubType | level)); } }