private void MarkObstacleLine(List <Vector3> pts, CellManager cellMgr, byte obstacle) { List <CellPos> pos_list = cellMgr.GetCellsCrossByPolyline(pts); foreach (CellPos pos in pos_list) { cellMgr.SetCellStatus(pos.row, pos.col, obstacle); } }
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)); } }