添加弹窗动画
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user