fix undo problem
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user