调整加分动画
This commit is contained in:
@@ -11,26 +11,19 @@ export class ScoreAdd extends Laya.Script {
|
||||
|
||||
onAwake(): void {
|
||||
this.label.scaleX = 0
|
||||
this.label.skewY = 0
|
||||
this.label.scaleY = 0
|
||||
|
||||
const d = this.owner.getComponent(AutoDestroy)
|
||||
d.lifeTime = 2
|
||||
}
|
||||
|
||||
onStart(): void {
|
||||
let wait = 0
|
||||
|
||||
let duration = 300
|
||||
Laya.Tween.to(this.label, { scaleX: 1, scaleY: 1 }, duration, Laya.Ease.strongIn, null, wait)
|
||||
wait += duration
|
||||
Laya.Tween.to(this.label, { scaleX: 1, scaleY: 1 }, 300, Laya.Ease.strongIn, null, 0)
|
||||
|
||||
duration = 300
|
||||
Laya.Tween.to(this.label, { y: -102 }, duration, Laya.Ease.strongIn, null, wait)
|
||||
wait += duration
|
||||
Laya.Tween.to(this.label, { y: -102 }, 300, Laya.Ease.strongIn, null, 500)
|
||||
|
||||
duration = 300
|
||||
Laya.Tween.to(this.label, { alpha: 0 }, duration, Laya.Ease.strongIn, null, wait)
|
||||
wait += duration
|
||||
Laya.Tween.to(this.label, { alpha: 0 }, 300, Laya.Ease.strongIn, null, 500)
|
||||
}
|
||||
|
||||
public onSetText(text: string): void {
|
||||
|
||||
Reference in New Issue
Block a user