private void MarkLevelLine(List <Vector3> pts, CellManager cellMgr, byte level) { List <CellPos> pos_list = cellMgr.GetCellsCrossByPolyline(pts); foreach (CellPos pos in pos_list) { byte status = cellMgr.GetCellStatus(pos.row, pos.col); byte typeAndSubType = BlockType.GetBlockTypeWithoutLevel(status); cellMgr.SetCellStatus(pos.row, pos.col, (byte)(typeAndSubType | level)); } }
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)); } }