格式化代码
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user