整理代码格式

This commit is contained in:
2025-06-10 18:24:50 +08:00
parent 285a1f9efe
commit 17c25ca099
18 changed files with 108 additions and 116 deletions

View File

@@ -26,32 +26,32 @@ export class TrophyClaim extends Laya.Script {
onAwake(): void {
this.mask = this.owner.getChildByName("Image") as Laya.Image
this.mask.alpha = 0
Laya.Tween.to(this.mask, {alpha: 0.8}, 600)
Laya.Tween.to(this.mask, { alpha: 0.8 }, 600)
this.center = this.owner.getChildByName("center") as Laya.Box
const light = this.center.getChildByName("light") as Laya.Image
light.scaleX = 0
light.scaleY = 0
Laya.Tween.to(light, {scaleX: 1, scaleY: 1}, 200, Utility_EaseOut_2, null, 200)
Laya.Tween.to(light, { scaleX: 1, scaleY: 1 }, 200, Utility_EaseOut_2, null, 200)
const trophy = this.center.getChildByName("trophy") as Laya.Image
trophy.scaleX = 0
trophy.scaleY = 0
Laya.Tween.to(trophy, {scaleX: 1, scaleY: 1}, 200, Utility_EaseOut_2, null, 200)
Laya.Tween.to(trophy, { scaleX: 1, scaleY: 1 }, 200, Utility_EaseOut_2, null, 200)
const blossom = trophy.getChildByName("blossom").getComponent(UISequenceAnimation)
Laya.timer.once(400, this, ()=>{
Laya.timer.once(400, this, () => {
blossom.onSetRunning(true)
})
const label_titlle = this.center.getChildByName("label_titlle") as Laya.Label
label_titlle.alpha = 0
Laya.Tween.to(label_titlle, {alpha: 1}, 600, Laya.Ease.linearNone, null, 600)
Laya.Tween.to(label_titlle, { alpha: 1 }, 600, Laya.Ease.linearNone, null, 600)
const btn_close = this.center.getChildByName("btn_close") as Laya.Box
btn_close.alpha = 0
Laya.Tween.to(btn_close, {alpha: 1}, 600, Laya.Ease.linearNone, null, 800)
Laya.Tween.to(btn_close, { alpha: 1 }, 600, Laya.Ease.linearNone, null, 800)
}
public onSetShow(record: TrophyRecord): void {

View File

@@ -56,7 +56,7 @@ export class TrophyRoom extends Laya.Script {
list.push(obj)
}
console.log(">>>>>>>>>>>>years=", years)
ResourceManager.getInstance().loadPrefab(respath.trophy_year_ui_res(), (go: any)=> {
ResourceManager.getInstance().loadPrefab(respath.trophy_year_ui_res(), (go: any) => {
for (let i = 1; i < years.length; i++) {
const obj_year = this.obj_items.getChildAt(i)
if (!obj_year) {
@@ -65,7 +65,7 @@ export class TrophyRoom extends Laya.Script {
}
}
ResourceManager.getInstance().loadPrefab(respath.trophy_cell_ui_res(), (go: any)=> {
ResourceManager.getInstance().loadPrefab(respath.trophy_cell_ui_res(), (go: any) => {
let itemsHeight = 0
for (let i = 0; i < years.length; i++) {
const list = monthMap.get(years[i])