fix: 有剩余大地图的道具信息渲染

This commit is contained in:
unanmed 2024-10-19 18:19:58 +08:00
parent 48ce4a2fb7
commit 4dd046cee3
2 changed files with 4 additions and 8 deletions

View File

@ -867,12 +867,6 @@ export class HeroMover extends ObjectMoverBase {
const dx = delta * progress;
loopHero.x = dx + from;
layer.update(layer);
console.log(
loopHero.x,
loopHero.y,
renderable.x,
renderable.y
);
},
this.moveSpeed,
() => {

View File

@ -98,8 +98,9 @@ export class FloorItemDetail implements ILayerGroupRenderExtends {
this.blockData.clear();
// 预留blockData
const [x, y] = this.sprite.block.getBlockXY(width, height);
const num = x * y;
this.sprite.block.size(width, height);
const data = this.sprite.block.blockData;
const num = data.width * data.height;
for (let i = 0; i <= num; i++) {
this.blockData.set(i, new Map());
this.detailData.set(i, new Map());
@ -159,6 +160,7 @@ export class FloorItemDetail implements ILayerGroupRenderExtends {
* @param block
*/
calAllItems(block: Set<number>) {
if (!core.status.thisMap) return;
if (this.dirtyBlock.size === 0 || block.size === 0) return;
let diff: Record<string | symbol, number | undefined> = {};
const before = core.status.hero;