fix: enemy48 显示错误

This commit is contained in:
unanmed 2025-09-30 13:52:41 +08:00
parent 8f4f8d86a9
commit 6891062351
4 changed files with 7 additions and 5 deletions

View File

@ -1026,6 +1026,8 @@ export class Layer extends Container<ELayerEvent> {
this.autotiles = {}; this.autotiles = {};
this.block.size(width, height); this.block.size(width, height);
this.block.clearAllCache(); this.block.clearAllCache();
this.bigImages.clear();
this.moving.clear();
for (const ex of this.extend.values()) { for (const ex of this.extend.values()) {
ex.onMapResize?.(this, width, height); ex.onMapResize?.(this, width, height);
@ -1160,7 +1162,7 @@ export class Layer extends Container<ELayerEvent> {
this.floorImage.forEach(v => { this.floorImage.forEach(v => {
if (v.disable) return; if (v.disable) return;
const { x, y } = v; const { x, y } = v;
ctx.fillRect(0, 0, 480, 480); ctx.fillRect(0, 0, MAP_WIDTH, MAP_HEIGHT);
ctx.drawImage(images[v.name], x, y); ctx.drawImage(images[v.name], x, y);
}); });
} }

View File

@ -179,13 +179,13 @@ export const ViewMap = defineComponent<ViewMapProps>(props => {
const renderTop = (canvas: MotaOffscreenCanvas2D) => { const renderTop = (canvas: MotaOffscreenCanvas2D) => {
const ctx = canvas.ctx; const ctx = canvas.ctx;
ctx.fillStyle = getTopGradient(ctx); ctx.fillStyle = getTopGradient(ctx);
ctx.fillRect(0, 0, 480, 64); ctx.fillRect(0, 0, MAP_WIDTH, 64);
}; };
const renderBottom = (canvas: MotaOffscreenCanvas2D) => { const renderBottom = (canvas: MotaOffscreenCanvas2D) => {
const ctx = canvas.ctx; const ctx = canvas.ctx;
ctx.fillStyle = getBottomGradient(ctx); ctx.fillStyle = getBottomGradient(ctx);
ctx.fillRect(0, 0, 480, 64); ctx.fillRect(0, 0, MAP_HEIGHT, 64);
}; };
const enterTop = () => (topAlpha.value = 0.9); const enterTop = () => (topAlpha.value = 0.9);

View File

@ -155,7 +155,7 @@ var comment_c456ea59_6018_45ef_8bcc_211a24c627dc = {
return current[0]; return current[0];
}).toString(), }).toString(),
"_docs": "绑定贴图", "_docs": "绑定贴图",
"_data": "该怪物绑定的怪物贴图,用法详见文档" "_data": "绑定贴图暂时不不支持,预计在 2.B.1 添加支持"
}, },
"hp": { "hp": {
"_leaf": true, "_leaf": true,

View File

@ -8,7 +8,7 @@ main.floors.sample0=
"canUseQuickShop": true, "canUseQuickShop": true,
"defaultGround": "ground", "defaultGround": "ground",
"images": [], "images": [],
"bgm": "bgm.opus", "bgm": "bgm.mp3",
"ratio": 1, "ratio": 1,
"map": [ "map": [
[ 0, 0,220, 0, 0, 20, 87, 3, 58, 59, 60, 61, 64], [ 0, 0,220, 0, 0, 20, 87, 3, 58, 59, 60, 61, 64],