fix undo problem

This commit is contained in:
2025-05-21 11:52:37 +08:00
parent a67e3a0fe4
commit 6d6596a562

View File

@@ -249,6 +249,12 @@ export class Stage extends Laya.Script {
}
this.onSetBlock(this.selectedBlock)
this.onUpdateScore()
var undos = this.data.get_undos()
if (undos.length > 0) {
var last = undos[undos.length-1]
this.selectedBlock = this.blocks[last.index]
this.onApplyBlock(this.selectedBlock)
}
}
}