计算积分
This commit is contained in:
@@ -21,7 +21,6 @@ export class Block extends Laya.Script {
|
||||
private tips_labels: Array<Laya.Label> = new Array();
|
||||
|
||||
private selected: boolean = false
|
||||
private newSelect: boolean = false
|
||||
|
||||
private data: DOBlock
|
||||
|
||||
@@ -56,8 +55,6 @@ export class Block extends Laya.Script {
|
||||
|
||||
public setSelected(selected: boolean): void {
|
||||
this.selected = selected
|
||||
if (selected)
|
||||
this.newSelect = true
|
||||
this.updateBlock()
|
||||
}
|
||||
|
||||
@@ -118,15 +115,16 @@ export class Block extends Laya.Script {
|
||||
return this.data
|
||||
}
|
||||
|
||||
public setShowNumber(showNumber: number): boolean {
|
||||
public setShowNumber(showNumber: number, score: number): boolean {
|
||||
this.data.set_show(showNumber)
|
||||
if (this.newSelect) {
|
||||
this.newSelect = false
|
||||
if (this.data.get_checked() && this.data.get_score() <= 0) {
|
||||
var score = 150
|
||||
this.data.set_score(score)
|
||||
if (this.data.get_checked()) {
|
||||
this.data.set_score(score)
|
||||
if (score > 0)
|
||||
G_ShowScoreTips(score.toString(), this.label_show)
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (this.data.get_score() != 0)
|
||||
this.data.set_score(0)
|
||||
}
|
||||
this.data.clean_notes()
|
||||
this.updateBlock()
|
||||
|
||||
Reference in New Issue
Block a user