fix: 地图数组获取方式

This commit is contained in:
unanmed 2025-11-19 16:36:08 +08:00
parent ea047a4af6
commit cdacdc50e7
2 changed files with 5 additions and 7 deletions

View File

@ -23,8 +23,6 @@ export function createGameRenderer() {
mainRenderer.hide(); mainRenderer.hide();
createApp(App).mount(mainRenderer); createApp(App).mount(mainRenderer);
console.log(mainRenderer);
} }
export function createRender() { export function createRender() {

View File

@ -163,11 +163,11 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = {
// 更新地图状态 // 更新地图状态
const { state } = Mota.require('@user/data-state'); const { state } = Mota.require('@user/data-state');
const bg = core.floors[floorId].bgmap ?? []; const bg = core.maps._getBgFgMapArray('bg', floorId);
const bg2 = core.floors[floorId].bg2map ?? []; const bg2 = core.maps._getBgFgMapArray('bg2', floorId);
const event = core.floors[floorId].map ?? []; const event = core.getMapArray(floorId);
const fg = core.floors[floorId].fgmap ?? []; const fg = core.maps._getBgFgMapArray('fg', floorId);
const fg2 = core.floors[floorId].fg2map ?? []; const fg2 = core.maps._getBgFgMapArray('fg2', floorId);
const { width, height } = core.floors[floorId]; const { width, height } = core.floors[floorId];
const bgLayer = state.layer.getLayerByAlias('bg'); const bgLayer = state.layer.getLayerByAlias('bg');
const bg2Layer = state.layer.getLayerByAlias('bg2'); const bg2Layer = state.layer.getLayerByAlias('bg2');