Пример #1
0
        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);
            }
        }
Пример #2
0
        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));
            }
        }