游戏结束

This commit is contained in:
2025-05-14 12:17:47 +08:00
parent 2cc01c5570
commit 830bf2bb29
27 changed files with 405 additions and 113 deletions

View File

@@ -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 = ""
}
}
}