mirror of
https://github.com/unanmed/HumanBreak.git
synced 2025-01-31 23:29:27 +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;
|
const dx = delta * progress;
|
||||||
loopHero.x = dx + from;
|
loopHero.x = dx + from;
|
||||||
layer.update(layer);
|
layer.update(layer);
|
||||||
console.log(
|
|
||||||
loopHero.x,
|
|
||||||
loopHero.y,
|
|
||||||
renderable.x,
|
|
||||||
renderable.y
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
this.moveSpeed,
|
this.moveSpeed,
|
||||||
() => {
|
() => {
|
||||||
|
@ -98,8 +98,9 @@ export class FloorItemDetail implements ILayerGroupRenderExtends {
|
|||||||
this.blockData.clear();
|
this.blockData.clear();
|
||||||
|
|
||||||
// 预留blockData
|
// 预留blockData
|
||||||
const [x, y] = this.sprite.block.getBlockXY(width, height);
|
this.sprite.block.size(width, height);
|
||||||
const num = x * y;
|
const data = this.sprite.block.blockData;
|
||||||
|
const num = data.width * data.height;
|
||||||
for (let i = 0; i <= num; i++) {
|
for (let i = 0; i <= num; i++) {
|
||||||
this.blockData.set(i, new Map());
|
this.blockData.set(i, new Map());
|
||||||
this.detailData.set(i, new Map());
|
this.detailData.set(i, new Map());
|
||||||
@ -159,6 +160,7 @@ export class FloorItemDetail implements ILayerGroupRenderExtends {
|
|||||||
* @param block 要计算的分块
|
* @param block 要计算的分块
|
||||||
*/
|
*/
|
||||||
calAllItems(block: Set<number>) {
|
calAllItems(block: Set<number>) {
|
||||||
|
if (!core.status.thisMap) return;
|
||||||
if (this.dirtyBlock.size === 0 || block.size === 0) return;
|
if (this.dirtyBlock.size === 0 || block.size === 0) return;
|
||||||
let diff: Record<string | symbol, number | undefined> = {};
|
let diff: Record<string | symbol, number | undefined> = {};
|
||||||
const before = core.status.hero;
|
const before = core.status.hero;
|
||||||
|
Loading…
Reference in New Issue
Block a user