补充加分动画细节

This commit is contained in:
2025-06-09 21:17:53 +08:00
parent 5814a2639c
commit 6e797f9665
5 changed files with 167 additions and 80 deletions

View File

@@ -8,10 +8,15 @@ const { regClass, property } = Laya
export class ScoreAdd extends Laya.Script {
declare owner: Laya.Box
@property(Laya.Label)
public shadow: Laya.Label
@property(Laya.Label)
public label: Laya.Label
onAwake(): void {
this.shadow.scaleX = 0
this.shadow.scaleY = 0
this.label.scaleX = 0
this.label.scaleY = 0
@@ -29,9 +34,13 @@ export class ScoreAdd extends Laya.Script {
const p = bezier(t / d)
return c * p + b
}
Laya.Tween.to(this.shadow, { scaleX: 1, scaleY: 1 }, 300, bezierEaseLaya1, null, 0)
Laya.Tween.to(this.label, { scaleX: 1, scaleY: 1 }, 300, bezierEaseLaya1, null, 0)
Laya.Tween.to(this.shadow, { y: -102 }, 300, Utility_EaseOut, null, 500)
Laya.Tween.to(this.label, { y: -102 }, 300, Utility_EaseOut, null, 500)
Laya.Tween.to(this.shadow, { alpha: 0 }, 300, Utility_EaseOut, null, 500)
Laya.Tween.to(this.label, { alpha: 0 }, 300, Utility_EaseOut, null, 500)
// Laya.Tween.to(this.label, { scaleX: 1, scaleY: 1 }, 300, Laya.Ease.bounceIn, null, 0)