格子排序问题

This commit is contained in:
2025-05-30 09:24:33 +08:00
parent 74758b2322
commit 74d686cf92

View File

@@ -112,10 +112,10 @@ export class Stage extends Laya.Script {
const kbox = VBox.getChildAt(k)
for (let l = 0; l < kbox.numChildren; l++) {
const block = kbox.getChildAt(l).getComponent(Block)
this.blocks.push(block)
const XIndex = j * 3 + l
const YIndex = i * 3 + k
block.onInit(XIndex, YIndex, XGroup, YGroup, this, this.onClickBlock)
this.blocks[XIndex + YIndex * 9] = block
}
}
}