格式化代码

This commit is contained in:
2025-05-28 18:47:51 +08:00
parent 6d44fc21b4
commit a7df8ec739
38 changed files with 2768 additions and 2840 deletions

View File

@@ -1,44 +1,39 @@
import { config } from "../constants/config";
import { AutoDestroy } from "./common/AutoDestroy";
import { AutoDestroy } from "./common/AutoDestroy"
const { regClass, property } = Laya;
const { regClass, property } = Laya
@regClass()
export class ScoreAdd extends Laya.Script {
declare owner : Laya.Box;
declare owner: Laya.Box
@property(Laya.Label)
public label: Laya.Label
@property(Laya.Label)
public label: Laya.Label
onAwake(): void {
this.label.scaleX = 0
this.label.skewY = 0
var d = this.owner.getComponent(AutoDestroy)
d.lifeTime = 2
}
onAwake(): void {
this.label.scaleX = 0
this.label.skewY = 0
onStart(): void {
const d = this.owner.getComponent(AutoDestroy)
d.lifeTime = 2
}
var wait = 0
onStart(): void {
let wait = 0
var duration = 300
Laya.Tween.to(this.label, {scaleX: 1, scaleY: 1}, duration, Laya.Ease.strongIn, null, wait)
wait += duration
let duration = 300
Laya.Tween.to(this.label, { scaleX: 1, scaleY: 1 }, duration, Laya.Ease.strongIn, null, wait)
wait += duration
duration = 300
Laya.Tween.to(this.label, {y:-102}, duration, Laya.Ease.strongIn, null, wait)
wait += duration
duration = 300
Laya.Tween.to(this.label, { y: -102 }, duration, Laya.Ease.strongIn, null, wait)
wait += duration
duration = 300
Laya.Tween.to(this.label, {alpha:0}, duration, Laya.Ease.strongIn, null, wait)
wait += duration
duration = 300
Laya.Tween.to(this.label, { alpha: 0 }, duration, Laya.Ease.strongIn, null, wait)
wait += duration
}
}
public onSetText(text: string): void {
this.label.text = text
}
}
public onSetText(text: string): void {
this.label.text = text
}
}