完善撤回逻辑
This commit is contained in:
@@ -119,20 +119,18 @@ export class Block extends Laya.Script {
|
||||
}
|
||||
|
||||
public setShowNumber(showNumber: number): boolean {
|
||||
if (this.data.get_checked() == false) {
|
||||
this.data.set_show(showNumber)
|
||||
var score: number = 0
|
||||
if (this.newSelect) {
|
||||
this.newSelect = false
|
||||
if (this.data.get_checked()) {
|
||||
score = 150
|
||||
this.data.set_score(score)
|
||||
G_ShowScoreTips(score.toString(), this.label_show)
|
||||
}
|
||||
}
|
||||
this.data.clean_notes()
|
||||
this.updateBlock()
|
||||
}
|
||||
this.data.set_show(showNumber)
|
||||
// var score: number = 0
|
||||
// if (this.newSelect) {
|
||||
// this.newSelect = false
|
||||
// if (this.data.get_checked()) {
|
||||
// score = 150
|
||||
// this.data.set_score(score)
|
||||
// G_ShowScoreTips(score.toString(), this.label_show)
|
||||
// }
|
||||
// }
|
||||
this.data.clean_notes()
|
||||
this.updateBlock()
|
||||
return this.data.get_checked()
|
||||
}
|
||||
|
||||
@@ -149,6 +147,14 @@ export class Block extends Laya.Script {
|
||||
}
|
||||
this.updateBlock()
|
||||
}
|
||||
public setNotes(notes: Array<number>): void {
|
||||
this.data.set_show(0)
|
||||
this.data.clean_notes()
|
||||
for (var i=0; i<notes.length; i++) {
|
||||
this.data.add_note(notes[i])
|
||||
}
|
||||
this.updateBlock()
|
||||
}
|
||||
|
||||
updateBlock(): void {
|
||||
//设置文字颜色
|
||||
|
||||
Reference in New Issue
Block a user