mirror of
https://github.com/unanmed/HumanBreak.git
synced 2025-01-19 12:49:25 +08:00
fix: 有剩余大地图的道具信息渲染
This commit is contained in:
parent
48ce4a2fb7
commit
4dd046cee3
@ -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,
|
||||
() => {
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user