添加弹窗动画

This commit is contained in:
2025-06-06 16:05:54 +08:00
parent 27f5716dcc
commit d6acd97396
11 changed files with 149 additions and 44 deletions

View File

@@ -1,3 +1,4 @@
import { Utility_EaseOut } from "../utils/utility";
import { AutoDestroy } from "./common/AutoDestroy"
import BezierEasing from 'bezier-easing';
@@ -30,13 +31,8 @@ export class ScoreAdd extends Laya.Script {
}
Laya.Tween.to(this.label, { scaleX: 1, scaleY: 1 }, 300, bezierEaseLaya1, null, 0)
function bezierEaseOut(t: number, b: number, c: number, d: number) {
const bezier = BezierEasing(0, 0, 0.58, 1)
const p = bezier(t / d)
return c * p + b
}
Laya.Tween.to(this.label, { y: -102 }, 300, bezierEaseOut, null, 500)
Laya.Tween.to(this.label, { alpha: 0 }, 300, bezierEaseOut, null, 500)
Laya.Tween.to(this.label, { y: -102 }, 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)
// Laya.Tween.to(this.label, { y: -102 }, 300, Laya.Ease.linearOut, null, 500)