补充加分动画细节
This commit is contained in:
@@ -1,45 +1,61 @@
|
|||||||
{
|
{
|
||||||
"_$ver": 1,
|
"_$ver": 1,
|
||||||
"_$id": "w86l3m5x",
|
"_$id": "qp8p7kt2",
|
||||||
"_$type": "Box",
|
"_$type": "Panel",
|
||||||
"name": "ScoreAdd",
|
"name": "ScoreAdd",
|
||||||
"width": 116,
|
"x": 340,
|
||||||
"height": 116,
|
"y": 760,
|
||||||
|
"width": 400,
|
||||||
|
"height": 400,
|
||||||
"centerX": 0,
|
"centerX": 0,
|
||||||
"centerY": 0,
|
"centerY": 0,
|
||||||
"_$comp": [
|
"_$comp": [
|
||||||
{
|
{
|
||||||
"_$type": "bdb0e671-99fa-47a5-9101-7ec008b1d25d",
|
"_$type": "bdb0e671-99fa-47a5-9101-7ec008b1d25d",
|
||||||
"scriptPath": "../src/views/common/AutoDestroy.ts",
|
"scriptPath": "../src/views/common/AutoDestroy.ts",
|
||||||
"lifeTime": 2
|
"lifeTime": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"_$type": "c910a064-d127-442e-a884-b5289c488647",
|
"_$type": "c910a064-d127-442e-a884-b5289c488647",
|
||||||
"scriptPath": "../src/views/ScoreAdd.ts",
|
"scriptPath": "../src/views/ScoreAdd.ts",
|
||||||
|
"shadow": {
|
||||||
|
"_$ref": "jbc42ybp"
|
||||||
|
},
|
||||||
"label": {
|
"label": {
|
||||||
"_$ref": "2eibhgkk"
|
"_$ref": "84q009kl"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"_$child": [
|
"_$child": [
|
||||||
{
|
{
|
||||||
"_$id": "2eibhgkk",
|
"_$id": "m50hoany",
|
||||||
|
"_$type": "Box",
|
||||||
|
"name": "offset",
|
||||||
|
"x": 142,
|
||||||
|
"y": 142,
|
||||||
|
"width": 116,
|
||||||
|
"height": 116,
|
||||||
|
"centerX": 0,
|
||||||
|
"centerY": 0,
|
||||||
|
"_$child": [
|
||||||
|
{
|
||||||
|
"_$id": "jbc42ybp",
|
||||||
"_$type": "Label",
|
"_$type": "Label",
|
||||||
"name": "Label",
|
"name": "shadow",
|
||||||
"x": 55,
|
"x": 55,
|
||||||
"y": -42,
|
"y": -42,
|
||||||
"width": 200,
|
"width": 200,
|
||||||
"height": 60,
|
"height": 60,
|
||||||
"anchorX": 0.5,
|
"anchorX": 0.5,
|
||||||
"anchorY": 0.5,
|
"anchorY": 0.5,
|
||||||
"alpha": 1,
|
"alpha": 0.18,
|
||||||
"_filters": [
|
"_filters": [
|
||||||
{
|
{
|
||||||
"_$type": "GlowFilter",
|
"_$type": "GlowFilter",
|
||||||
"offX": 0,
|
"offX": 0,
|
||||||
"offY": 6,
|
"offY": 6,
|
||||||
"blur": 18,
|
"blur": 18,
|
||||||
"color": "rgba(164, 164, 164, 1)"
|
"color": "rgba(0, 0, 0, 1)"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"centerX": -3,
|
"centerX": -3,
|
||||||
@@ -48,9 +64,30 @@
|
|||||||
"fontSize": 60,
|
"fontSize": 60,
|
||||||
"color": "rgba(29, 92, 220, 1)",
|
"color": "rgba(29, 92, 220, 1)",
|
||||||
"bold": true,
|
"bold": true,
|
||||||
"italic": false,
|
"align": "center",
|
||||||
"underline": false,
|
"valign": "middle",
|
||||||
"strikethrough": false,
|
"padding": "0,0,0,0",
|
||||||
|
"underlineColor": "rgba(255, 255, 255, 1)",
|
||||||
|
"stroke": 16,
|
||||||
|
"strokeColor": "rgba(255, 255, 255, 1)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_$id": "84q009kl",
|
||||||
|
"_$type": "Label",
|
||||||
|
"name": "label",
|
||||||
|
"x": 55,
|
||||||
|
"y": -42,
|
||||||
|
"width": 200,
|
||||||
|
"height": 60,
|
||||||
|
"anchorX": 0.5,
|
||||||
|
"anchorY": 0.5,
|
||||||
|
"_filters": [],
|
||||||
|
"centerX": -3,
|
||||||
|
"text": "+150",
|
||||||
|
"font": "res://7322bbf9-175b-4a25-a0d7-72d369894de2",
|
||||||
|
"fontSize": 60,
|
||||||
|
"color": "rgba(29, 92, 220, 1)",
|
||||||
|
"bold": true,
|
||||||
"align": "center",
|
"align": "center",
|
||||||
"valign": "middle",
|
"valign": "middle",
|
||||||
"padding": "0,0,0,0",
|
"padding": "0,0,0,0",
|
||||||
@@ -59,4 +96,6 @@
|
|||||||
"strokeColor": "rgba(255, 255, 255, 1)"
|
"strokeColor": "rgba(255, 255, 255, 1)"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
{
|
{
|
||||||
"uuid": "cc3e3def-73ab-4c93-91ca-15fe9360c857"
|
"uuid": "a6888ac8-9ecc-4be9-8083-88d536e334df"
|
||||||
}
|
}
|
||||||
@@ -1,50 +1,87 @@
|
|||||||
{
|
{
|
||||||
"_$ver": 1,
|
"_$ver": 1,
|
||||||
"_$id": "r3lhk79l",
|
"_$id": "92hrkiys",
|
||||||
"_$type": "Box",
|
"_$type": "Panel",
|
||||||
"name": "ScoreAdd_H",
|
"name": "ScoreAdd_H",
|
||||||
"x": 915,
|
"x": -155,
|
||||||
"y": 495,
|
"y": -155,
|
||||||
"width": 90,
|
"width": 400,
|
||||||
"height": 90,
|
"height": 400,
|
||||||
"drawCallOptimize": true,
|
|
||||||
"centerX": 0,
|
"centerX": 0,
|
||||||
"centerY": 0,
|
"centerY": 0,
|
||||||
"_$comp": [
|
"_$comp": [
|
||||||
{
|
|
||||||
"_$type": "bdb0e671-99fa-47a5-9101-7ec008b1d25d",
|
|
||||||
"scriptPath": "../src/views/common/AutoDestroy.ts",
|
|
||||||
"lifeTime": 2
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"_$type": "c910a064-d127-442e-a884-b5289c488647",
|
"_$type": "c910a064-d127-442e-a884-b5289c488647",
|
||||||
"scriptPath": "../src/views/ScoreAdd.ts",
|
"scriptPath": "../src/views/ScoreAdd.ts",
|
||||||
|
"shadow": {
|
||||||
|
"_$ref": "3o1c6tto"
|
||||||
|
},
|
||||||
"label": {
|
"label": {
|
||||||
"_$ref": "4337viuh"
|
"_$ref": "lyvq5xfn"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_$type": "bdb0e671-99fa-47a5-9101-7ec008b1d25d",
|
||||||
|
"scriptPath": "../src/views/common/AutoDestroy.ts",
|
||||||
|
"lifeTime": 1
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"_$child": [
|
"_$child": [
|
||||||
{
|
{
|
||||||
"_$id": "4337viuh",
|
"_$id": "4yn55zcj",
|
||||||
|
"_$type": "Box",
|
||||||
|
"name": "offset",
|
||||||
|
"x": 155,
|
||||||
|
"y": 155,
|
||||||
|
"width": 90,
|
||||||
|
"height": 90,
|
||||||
|
"centerX": 0,
|
||||||
|
"centerY": 0,
|
||||||
|
"_$child": [
|
||||||
|
{
|
||||||
|
"_$id": "3o1c6tto",
|
||||||
"_$type": "Label",
|
"_$type": "Label",
|
||||||
"name": "Label",
|
"name": "shadow",
|
||||||
"x": 42,
|
"x": 45,
|
||||||
"y": -42,
|
"y": -42,
|
||||||
"width": 200,
|
"width": 200,
|
||||||
"height": 45,
|
"height": 45,
|
||||||
"anchorX": 0.5,
|
"anchorX": 0.5,
|
||||||
"anchorY": 0.5,
|
"anchorY": 0.5,
|
||||||
|
"alpha": 0.18,
|
||||||
"_filters": [
|
"_filters": [
|
||||||
{
|
{
|
||||||
"_$type": "GlowFilter",
|
"_$type": "GlowFilter",
|
||||||
"offX": 0,
|
"offX": 0,
|
||||||
"offY": 6,
|
"offY": 6,
|
||||||
"blur": 18,
|
"blur": 18,
|
||||||
"color": "rgba(164, 164, 164, 1)"
|
"color": "rgba(0, 0, 0, 1)"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"centerX": -3,
|
"centerX": 0,
|
||||||
|
"text": "+150",
|
||||||
|
"font": "res://7322bbf9-175b-4a25-a0d7-72d369894de2",
|
||||||
|
"fontSize": 45,
|
||||||
|
"color": "rgba(29, 92, 220, 1)",
|
||||||
|
"bold": true,
|
||||||
|
"align": "center",
|
||||||
|
"valign": "middle",
|
||||||
|
"padding": "0,0,0,0",
|
||||||
|
"stroke": 16,
|
||||||
|
"strokeColor": "rgba(255, 255, 255, 1)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_$id": "lyvq5xfn",
|
||||||
|
"_$type": "Label",
|
||||||
|
"name": "label",
|
||||||
|
"x": 45,
|
||||||
|
"y": -42,
|
||||||
|
"width": 200,
|
||||||
|
"height": 45,
|
||||||
|
"anchorX": 0.5,
|
||||||
|
"anchorY": 0.5,
|
||||||
|
"_filters": [],
|
||||||
|
"centerX": 0,
|
||||||
"text": "+150",
|
"text": "+150",
|
||||||
"font": "res://7322bbf9-175b-4a25-a0d7-72d369894de2",
|
"font": "res://7322bbf9-175b-4a25-a0d7-72d369894de2",
|
||||||
"fontSize": 45,
|
"fontSize": 45,
|
||||||
@@ -57,4 +94,6 @@
|
|||||||
"strokeColor": "rgba(255, 255, 255, 1)"
|
"strokeColor": "rgba(255, 255, 255, 1)"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
{
|
{
|
||||||
"uuid": "79c5a2f1-0c0d-484c-ad6f-f31b3f3fcbd2"
|
"uuid": "44b37e5b-1d00-4f14-8362-1921afd5fce8"
|
||||||
}
|
}
|
||||||
@@ -8,10 +8,15 @@ const { regClass, property } = Laya
|
|||||||
export class ScoreAdd extends Laya.Script {
|
export class ScoreAdd extends Laya.Script {
|
||||||
declare owner: Laya.Box
|
declare owner: Laya.Box
|
||||||
|
|
||||||
|
@property(Laya.Label)
|
||||||
|
public shadow: Laya.Label
|
||||||
|
|
||||||
@property(Laya.Label)
|
@property(Laya.Label)
|
||||||
public label: Laya.Label
|
public label: Laya.Label
|
||||||
|
|
||||||
onAwake(): void {
|
onAwake(): void {
|
||||||
|
this.shadow.scaleX = 0
|
||||||
|
this.shadow.scaleY = 0
|
||||||
this.label.scaleX = 0
|
this.label.scaleX = 0
|
||||||
this.label.scaleY = 0
|
this.label.scaleY = 0
|
||||||
|
|
||||||
@@ -29,9 +34,13 @@ export class ScoreAdd extends Laya.Script {
|
|||||||
const p = bezier(t / d)
|
const p = bezier(t / d)
|
||||||
return c * p + b
|
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.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.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, { 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, { scaleX: 1, scaleY: 1 }, 300, Laya.Ease.bounceIn, null, 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user