代码格式化

This commit is contained in:
2025-06-13 18:13:16 +08:00
parent 43e6d58acf
commit 86a4eab71b
8 changed files with 28 additions and 32 deletions

View File

@@ -99,7 +99,7 @@ export class CalendarUnit extends Laya.Script {
this.sprite_pie.graphics.clear()
this.sprite_pie.graphics.drawPie(this.pieSize, this.pieSize, this.pieSize, 0, 360 * this.progress, "#ffffff")
this.sprite_mask.graphics.clear()
this.sprite_mask.graphics.drawCircle(this.obj_mask.width/2, this.obj_mask.width/2, this.obj_mask.width/2, "#1d5cdc")
this.sprite_mask.graphics.drawCircle(this.obj_mask.width / 2, this.obj_mask.width / 2, this.obj_mask.width / 2, "#1d5cdc")
} else {
this.obj_pie.visible = false
this.obj_mask.visible = false
@@ -113,7 +113,7 @@ export class CalendarUnit extends Laya.Script {
this.sprite_pie.graphics.clear()
this.sprite_pie.graphics.drawPie(this.pieSize, this.pieSize, this.pieSize, 0, 360 * this.progress, "#2d3138")
this.sprite_mask.graphics.clear()
this.sprite_mask.graphics.drawCircle(this.obj_mask.width/2, this.obj_mask.width/2, this.obj_mask.width/2, "#ffffff")
this.sprite_mask.graphics.drawCircle(this.obj_mask.width / 2, this.obj_mask.width / 2, this.obj_mask.width / 2, "#ffffff")
} else {
this.obj_pie.visible = false
this.obj_mask.visible = false

View File

@@ -76,12 +76,12 @@ export class TrophyRoom extends Laya.Script {
label.text = years[i].toString()
for (let j = 2; j < cellCount + 1; j++) {
const prefab = go.create()
obj_year.addChild(prefab)
const prefab = go.create()
obj_year.addChild(prefab)
}
let index = -1
for (let j = 1; j < cellCount + 1; j++) {
let obj_cell = obj_year.getChildAt(j)
const obj_cell = obj_year.getChildAt(j)
const hbox = obj_cell.getChildByName("HBox")
for (let k = 0; k < hbox.numChildren; k++) {
const unit = hbox.getChildAt(k).getComponent(TrophyUnit)