格子排序问题
This commit is contained in:
@@ -112,10 +112,10 @@ export class Stage extends Laya.Script {
|
|||||||
const kbox = VBox.getChildAt(k)
|
const kbox = VBox.getChildAt(k)
|
||||||
for (let l = 0; l < kbox.numChildren; l++) {
|
for (let l = 0; l < kbox.numChildren; l++) {
|
||||||
const block = kbox.getChildAt(l).getComponent(Block)
|
const block = kbox.getChildAt(l).getComponent(Block)
|
||||||
this.blocks.push(block)
|
|
||||||
const XIndex = j * 3 + l
|
const XIndex = j * 3 + l
|
||||||
const YIndex = i * 3 + k
|
const YIndex = i * 3 + k
|
||||||
block.onInit(XIndex, YIndex, XGroup, YGroup, this, this.onClickBlock)
|
block.onInit(XIndex, YIndex, XGroup, YGroup, this, this.onClickBlock)
|
||||||
|
this.blocks[XIndex + YIndex * 9] = block
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user