图层修改

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-07-14 16:02:20 +08:00
parent ff1542c24f
commit ae75fce80b
5121 changed files with 17930 additions and 16467861 deletions

View File

@@ -5,9 +5,9 @@ import { EDITOR, PREVIEW, BUILD } from 'cc/env';
import {
cellToWorldCenter, tileNodeName, parseTileNodeName, getHalfCellSize,
} from '../core/GridCoords';
import { CommonDefine } from '../core/Define';
import { LevelMapData } from './LevelMapData';
import { alignTileNode, setupLayerContainer, sortIsoTiles } from './TileLayout';
import { resolveTileNameAtCell } from './TileKinds';
const { ccclass, property, executeInEditMode, executionOrder } = _decorator;
@@ -257,10 +257,7 @@ export class GridSnapHelper extends Component {
groundMap: Record<string, string>,
borderMap: Record<string, boolean | string>,
): string {
if (layer === 'ground') return groundMap[key] ?? CommonDefine.BlockBase;
const v = borderMap[key];
if (typeof v === 'string') return v;
return 'WallBlock';
return resolveTileNameAtCell(layer, key, groundMap, borderMap);
}
private applySnap(