补充积分逻辑
This commit is contained in:
@@ -29,6 +29,8 @@ export class DOBlock {
|
|||||||
public set_show(show: number): void {
|
public set_show(show: number): void {
|
||||||
this.data.show = show
|
this.data.show = show
|
||||||
this.checked = show == this.get_correct()
|
this.checked = show == this.get_correct()
|
||||||
|
if (this.checked == false)
|
||||||
|
this.set_score(0)
|
||||||
StorageManager.getInstance().onChanged()
|
StorageManager.getInstance().onChanged()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -120,15 +120,14 @@ export class Block extends Laya.Script {
|
|||||||
|
|
||||||
public setShowNumber(showNumber: number): boolean {
|
public setShowNumber(showNumber: number): boolean {
|
||||||
this.data.set_show(showNumber)
|
this.data.set_show(showNumber)
|
||||||
// var score: number = 0
|
if (this.newSelect) {
|
||||||
// if (this.newSelect) {
|
this.newSelect = false
|
||||||
// this.newSelect = false
|
if (this.data.get_checked() && this.data.get_score() <= 0) {
|
||||||
// if (this.data.get_checked()) {
|
var score = 150
|
||||||
// score = 150
|
this.data.set_score(score)
|
||||||
// this.data.set_score(score)
|
G_ShowScoreTips(score.toString(), this.label_show)
|
||||||
// G_ShowScoreTips(score.toString(), this.label_show)
|
}
|
||||||
// }
|
}
|
||||||
// }
|
|
||||||
this.data.clean_notes()
|
this.data.clean_notes()
|
||||||
this.updateBlock()
|
this.updateBlock()
|
||||||
return this.data.get_checked()
|
return this.data.get_checked()
|
||||||
|
|||||||
@@ -223,6 +223,7 @@ export class Stage extends Laya.Script {
|
|||||||
this.selectedBlock.setShowNumber(undo.show)
|
this.selectedBlock.setShowNumber(undo.show)
|
||||||
}
|
}
|
||||||
this.onSetBlock(this.selectedBlock)
|
this.onSetBlock(this.selectedBlock)
|
||||||
|
this.onUpdateScore()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user