游戏结束
This commit is contained in:
@@ -30,23 +30,22 @@ export class Candy extends Laya.Script {
|
||||
this.updateCandy()
|
||||
}
|
||||
|
||||
public getLeft(): number {
|
||||
return this.data.get_left();
|
||||
}
|
||||
|
||||
updateCandy(): void {
|
||||
this.owner.active = this.getLeft() > 0
|
||||
if (this.data.get_show() > 0) {
|
||||
this.label_show.text = this.data.get_show().toString()
|
||||
}
|
||||
else {
|
||||
this.label_show.text = ""
|
||||
}
|
||||
if (this.getLeft() > 0) {
|
||||
this.label_left.text = this.getLeft().toString();
|
||||
|
||||
if (this.data.get_left() > 0) {
|
||||
this.label_left.text = this.data.get_left().toString();
|
||||
this.owner.visible = true
|
||||
}
|
||||
else {
|
||||
this.label_left.text = ""
|
||||
this.owner.visible = false
|
||||
this.label_show.text = ""
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user