From 5c66f3b8d26cee1723fd1e4dad7c3ee72c5b103c Mon Sep 17 00:00:00 2001 From: yangwen Date: Thu, 29 May 2025 19:03:29 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=BB=93=E7=AE=97=E5=8A=A8?= =?UTF-8?q?=E7=94=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/resources/GameDone_DC.lh | 31 +++++-- assets/resources/GameDone_DC_H.lh | 22 +++-- assets/resources/GameDone_Normal.lh | 107 ++++++++++++----------- assets/resources/GameDone_Normal.lh.meta | 2 +- assets/resources/GameDone_Normal_H.lh | 39 +++++++-- src/views/GameDone.ts | 40 +++++++++ src/views/common/AutoRotate.ts | 24 +++++ src/views/common/AutoRotate.ts.meta | 3 + 8 files changed, 197 insertions(+), 71 deletions(-) create mode 100644 src/views/common/AutoRotate.ts create mode 100644 src/views/common/AutoRotate.ts.meta diff --git a/assets/resources/GameDone_DC.lh b/assets/resources/GameDone_DC.lh index f372076..48ebfef 100644 --- a/assets/resources/GameDone_DC.lh +++ b/assets/resources/GameDone_DC.lh @@ -7,14 +7,22 @@ "height": 1920, "_mouseState": 2, "drawCallOptimize": true, - "left": 0, - "right": 0, - "top": 0, - "bottom": 0, "_$comp": [ { "_$type": "13e020d1-5ab8-4082-80ca-c0d208342103", "scriptPath": "../src/views/GameDone.ts", + "obj_light": { + "_$ref": "fmyff6zc" + }, + "obj_summary": { + "_$ref": "n4jhcwy7" + }, + "star1": { + "_$ref": "fxmo764l" + }, + "star2": { + "_$ref": "c94zj9eo" + }, "label_diffucuty": { "_$ref": "sli8jsxk" }, @@ -63,16 +71,25 @@ "_$id": "fmyff6zc", "_$type": "Image", "name": "light", - "x": -894, - "y": -1308, + "x": 492, + "y": 78, "width": 924, "height": 924, + "anchorX": 0.5, + "anchorY": 0.5, "scaleX": 3, "scaleY": 3, "alpha": 0.2, "centerX": 0, "skin": "res://ebbaa034-8dd8-4fb8-abd5-094cdd76f93a", - "color": "#ffffff" + "color": "#ffffff", + "_$comp": [ + { + "_$type": "b4f67ca3-86fe-409d-a439-63a715243fb7", + "scriptPath": "../src/views/common/AutoRotate.ts", + "speed": 1 + } + ] }, { "_$id": "rvuzq3il", diff --git a/assets/resources/GameDone_DC_H.lh b/assets/resources/GameDone_DC_H.lh index 111beb0..4046781 100644 --- a/assets/resources/GameDone_DC_H.lh +++ b/assets/resources/GameDone_DC_H.lh @@ -7,14 +7,22 @@ "height": 1080, "_mouseState": 2, "drawCallOptimize": true, - "left": 0, - "right": 0, - "top": 0, - "bottom": 0, "_$comp": [ { "_$type": "13e020d1-5ab8-4082-80ca-c0d208342103", "scriptPath": "../src/views/GameDone.ts", + "obj_light": { + "_$ref": "21h6okrs" + }, + "obj_summary": { + "_$ref": "b4jktp33" + }, + "star1": { + "_$ref": "drl27n5v" + }, + "star2": { + "_$ref": "92i5b9b6" + }, "label_diffucuty": { "_$ref": "t56jxo0a" }, @@ -64,10 +72,12 @@ "_$id": "21h6okrs", "_$type": "Image", "name": "light", - "x": -912, - "y": -1243, + "x": 474, + "y": 143, "width": 924, "height": 924, + "anchorX": 0.5, + "anchorY": 0.5, "scaleX": 3, "scaleY": 3, "alpha": 0.2, diff --git a/assets/resources/GameDone_Normal.lh b/assets/resources/GameDone_Normal.lh index 9f4744d..8a19040 100644 --- a/assets/resources/GameDone_Normal.lh +++ b/assets/resources/GameDone_Normal.lh @@ -1,43 +1,51 @@ { "_$ver": 1, - "_$id": "tb0rwhxa", + "_$id": "hoxxnmyk", "_$type": "Box", "name": "GameDone_Normal", "width": 1080, "height": 1920, "_mouseState": 2, "drawCallOptimize": true, - "left": 0, - "right": 0, - "top": 0, - "bottom": 0, "_$comp": [ { "_$type": "13e020d1-5ab8-4082-80ca-c0d208342103", "scriptPath": "../src/views/GameDone.ts", + "obj_light": { + "_$ref": "8sgjzety" + }, + "obj_summary": { + "_$ref": "b4ajczjh" + }, + "star1": { + "_$ref": "c911dc1t" + }, + "star2": { + "_$ref": "7m6pwbe2" + }, "label_diffucuty": { - "_$ref": "0ixembkp" + "_$ref": "mdvetv8w" }, "label_time": { - "_$ref": "1272i5dx" + "_$ref": "m58npz18" }, "label_score": { - "_$ref": "m862gukv" + "_$ref": "ehpkcr9o" }, "btn_new": { - "_$ref": "mc0nkzbc" + "_$ref": "iamtc0bw" }, "btn_home": { - "_$ref": "hi94xa9c" + "_$ref": "v0482f5q" }, "btn_continue": { - "_$ref": "sjhqb7th" + "_$ref": "qg9k7yph" } } ], "_$child": [ { - "_$id": "wq9kruly", + "_$id": "9omycrdv", "_$type": "Image", "name": "bg_done", "width": 1080, @@ -50,7 +58,7 @@ "color": "#ffffff" }, { - "_$id": "bpp1ufzt", + "_$id": "kpsallku", "_$type": "Box", "name": "top", "x": 48, @@ -60,13 +68,15 @@ "centerX": 0, "_$child": [ { - "_$id": "qikt5s3n", + "_$id": "8sgjzety", "_$type": "Image", "name": "light", - "x": -894, - "y": -1308, + "x": 492, + "y": 78, "width": 924, "height": 924, + "anchorX": 0.5, + "anchorY": 0.5, "scaleX": 3, "scaleY": 3, "alpha": 0.2, @@ -75,7 +85,7 @@ "color": "#ffffff" }, { - "_$id": "zy8kt255", + "_$id": "hm9tgyxm", "_$type": "Image", "name": "bg", "width": 984, @@ -84,7 +94,7 @@ "color": "#ffffff", "_$child": [ { - "_$id": "7e6httdt", + "_$id": "jn1frxzv", "_$type": "Sprite", "name": "Sprite", "y": 180, @@ -108,7 +118,7 @@ ] }, { - "_$id": "lehn4i5n", + "_$id": "wtf5sc1b", "_$type": "Sprite", "name": "Sprite(1)", "x": 44, @@ -122,8 +132,8 @@ "y": 0, "width": 1, "height": 1, - "lt": 48, - "rt": 48, + "lt": 0, + "rt": 0, "lb": 48, "rb": 48, "percent": true, @@ -135,7 +145,7 @@ ] }, { - "_$id": "h17oqjco", + "_$id": "c0d4puxi", "_$type": "Box", "name": "stars", "y": -168, @@ -144,7 +154,7 @@ "centerX": 0, "_$child": [ { - "_$id": "1pojk26f", + "_$id": "c911dc1t", "_$type": "Image", "name": "check(1)", "x": 69, @@ -156,7 +166,7 @@ "color": "#ffffff" }, { - "_$id": "77vbik9p", + "_$id": "7m6pwbe2", "_$type": "Image", "name": "check(2)", "x": 339, @@ -168,7 +178,7 @@ "color": "#ffffff" }, { - "_$id": "e2e1gtl4", + "_$id": "svxs9o8h", "_$type": "Image", "name": "check(3)", "x": 696, @@ -183,7 +193,7 @@ ] }, { - "_$id": "70qa0no4", + "_$id": "08ict2h8", "_$type": "Image", "name": "star", "x": 330, @@ -198,7 +208,7 @@ "color": "#ffffff" }, { - "_$id": "pqzfo8sl", + "_$id": "bp5q98ww", "_$type": "Label", "name": "Label", "y": 226, @@ -216,7 +226,7 @@ "padding": "0,0,0,0" }, { - "_$id": "rl3kcm3v", + "_$id": "b4ajczjh", "_$type": "VBox", "name": "summary", "x": 92, @@ -227,14 +237,14 @@ "space": 0, "_$child": [ { - "_$id": "iiwdr15i", + "_$id": "3qkj5yqe", "_$type": "Box", "name": "Box(1)", "width": 800, "height": 100, "_$child": [ { - "_$id": "wnlb4xhm", + "_$id": "710awfoj", "_$type": "Label", "name": "Label", "width": 400, @@ -247,7 +257,7 @@ "padding": "0,0,0,0" }, { - "_$id": "0ixembkp", + "_$id": "mdvetv8w", "_$type": "Label", "name": "label_difficulty", "x": 400, @@ -264,7 +274,7 @@ ] }, { - "_$id": "lm5rwror", + "_$id": "1uy3yxmb", "_$type": "Box", "name": "Box(2)", "y": 100, @@ -272,7 +282,7 @@ "height": 100, "_$child": [ { - "_$id": "a68e1efb", + "_$id": "1elmylvy", "_$type": "Label", "name": "Label", "width": 400, @@ -285,7 +295,7 @@ "padding": "0,0,0,0" }, { - "_$id": "1272i5dx", + "_$id": "m58npz18", "_$type": "Label", "name": "label_time", "x": 400, @@ -302,7 +312,7 @@ ] }, { - "_$id": "icyo8m9c", + "_$id": "0uq4p6hn", "_$type": "Box", "name": "Box(3)", "y": 200, @@ -310,7 +320,7 @@ "height": 100, "_$child": [ { - "_$id": "y9lst94l", + "_$id": "wxyzvkry", "_$type": "Label", "name": "Label", "width": 400, @@ -323,7 +333,7 @@ "padding": "0,0,0,0" }, { - "_$id": "m862gukv", + "_$id": "ehpkcr9o", "_$type": "Label", "name": "label_score", "x": 400, @@ -344,7 +354,7 @@ ] }, { - "_$id": "358kjl5m", + "_$id": "xuh25cg6", "_$type": "Box", "name": "bottom", "y": 1408, @@ -355,19 +365,18 @@ "bottom": 20, "_$child": [ { - "_$id": "mc0nkzbc", + "_$id": "iamtc0bw", "_$type": "Box", "name": "btn_new", "x": 144, "y": 48, "width": 792, "height": 156, - "visible": false, "bottom": 288, "centerX": 0, "_$child": [ { - "_$id": "i7ycdrdh", + "_$id": "9sx9tjpd", "_$type": "Sprite", "name": "Sprite", "width": 792, @@ -390,7 +399,7 @@ ] }, { - "_$id": "3l44gfhf", + "_$id": "ja6hq7t3", "_$type": "Label", "name": "Label", "width": 792, @@ -409,19 +418,18 @@ ] }, { - "_$id": "hi94xa9c", + "_$id": "v0482f5q", "_$type": "Box", "name": "btn_home", "x": 144, "y": 240, "width": 792, "height": 156, - "visible": false, "bottom": 96, "centerX": 0, "_$child": [ { - "_$id": "v7f0dd77", + "_$id": "kq8dx0a5", "_$type": "Sprite", "name": "Sprite", "width": 792, @@ -445,7 +453,7 @@ ] }, { - "_$id": "7yl1g4st", + "_$id": "udsrjywv", "_$type": "Label", "name": "Label", "width": 792, @@ -464,18 +472,19 @@ ] }, { - "_$id": "sjhqb7th", + "_$id": "qg9k7yph", "_$type": "Box", "name": "btn_continue", "x": 144, "y": 240, "width": 792, "height": 156, + "visible": false, "bottom": 96, "centerX": 0, "_$child": [ { - "_$id": "pmpygkuu", + "_$id": "rad99t4v", "_$type": "Sprite", "name": "Sprite", "width": 792, @@ -498,7 +507,7 @@ ] }, { - "_$id": "mokkhys7", + "_$id": "ts6fsnbx", "_$type": "Label", "name": "Label", "width": 792, diff --git a/assets/resources/GameDone_Normal.lh.meta b/assets/resources/GameDone_Normal.lh.meta index c82e4bf..54399ac 100644 --- a/assets/resources/GameDone_Normal.lh.meta +++ b/assets/resources/GameDone_Normal.lh.meta @@ -1,3 +1,3 @@ { - "uuid": "f3dd4b0b-9a46-4861-a565-8713b6c1c6be" + "uuid": "55e1fe3f-9916-4b74-9952-7bede46b21ba" } \ No newline at end of file diff --git a/assets/resources/GameDone_Normal_H.lh b/assets/resources/GameDone_Normal_H.lh index b49aff5..3830d02 100644 --- a/assets/resources/GameDone_Normal_H.lh +++ b/assets/resources/GameDone_Normal_H.lh @@ -3,18 +3,27 @@ "_$id": "mydj8ynl", "_$type": "Box", "name": "GameDone_Normal_H", + "y": -784, "width": 1920, "height": 1080, "_mouseState": 2, "drawCallOptimize": true, - "left": 0, - "right": 0, - "top": 0, - "bottom": 0, "_$comp": [ { "_$type": "13e020d1-5ab8-4082-80ca-c0d208342103", "scriptPath": "../src/views/GameDone.ts", + "obj_light": { + "_$ref": "3t9mq776" + }, + "obj_summary": { + "_$ref": "nv7eszk1" + }, + "star1": { + "_$ref": "dy7essc0" + }, + "star2": { + "_$ref": "zyknbizk" + }, "label_diffucuty": { "_$ref": "291hwgvn" }, @@ -64,16 +73,25 @@ "_$id": "3t9mq776", "_$type": "Image", "name": "light", - "x": -912, - "y": -1243, + "x": 474, + "y": 143, "width": 924, "height": 924, + "anchorX": 0.5, + "anchorY": 0.5, "scaleX": 3, "scaleY": 3, "alpha": 0.2, "centerX": 0, "skin": "res://ebbaa034-8dd8-4fb8-abd5-094cdd76f93a", - "color": "#ffffff" + "color": "#ffffff", + "_$comp": [ + { + "_$type": "b4f67ca3-86fe-409d-a439-63a715243fb7", + "scriptPath": "../src/views/common/AutoRotate.ts", + "speed": 1 + } + ] }, { "_$id": "bj4g8sfa", @@ -223,6 +241,9 @@ "y": 475, "width": 876, "height": 280, + "scaleX": 1, + "scaleY": 1, + "alpha": 1, "centerX": 0, "space": 0, "align": "center", @@ -368,6 +389,7 @@ "y": 366, "width": 540, "height": 156, + "alpha": 1, "top": 366, "centerX": 0, "_$child": [ @@ -420,7 +442,7 @@ "y": 558, "width": 540, "height": 156, - "visible": false, + "visible": true, "top": 558, "centerX": 0, "_$child": [ @@ -475,6 +497,7 @@ "width": 540, "height": 156, "visible": false, + "alpha": 1, "centerX": 0, "_$child": [ { diff --git a/src/views/GameDone.ts b/src/views/GameDone.ts index 580491f..79e7a59 100644 --- a/src/views/GameDone.ts +++ b/src/views/GameDone.ts @@ -12,6 +12,18 @@ const { regClass, property } = Laya export class GameDone extends Laya.Script { declare owner: Laya.Box + @property(Laya.Image) + public obj_light: Laya.Image + + @property(Laya.Box) + public obj_summary: Laya.Box + + @property(Laya.Image) + public star1: Laya.Image + + @property(Laya.Image) + public star2: Laya.Image + @property(Laya.Label) public label_diffucuty: Laya.Label @@ -31,7 +43,35 @@ export class GameDone extends Laya.Script { public btn_continue: Laya.Box onStart(): void { + this.owner.x = 0 + this.owner.y = -this.owner.height + Laya.Tween.to(this.owner, {y: 0}, 300, Laya.Ease.elasticOut) + this.obj_summary.alpha = 0 + Laya.Tween.to(this.obj_summary, {alpha: 1}, 400, Laya.Ease.elasticOut, null, 100) + this.obj_summary.scaleX = 0.8 + this.obj_summary.scaleY = 0.8 + Laya.Tween.to(this.obj_summary, {scaleX: 1, scaleY: 1}, 400, Laya.Ease.elasticOut, null, 100) + + this.star1.scaleX = 1.2 + this.star1.scaleY = 1.2 + Laya.Tween.to(this.star1, {scaleX: 1, scaleY: 1}, 300, Laya.Ease.elasticOut, null, 400) + const y1 = this.star1.y + this.star1.y = y1 - 10 + Laya.Tween.to(this.star1, {y: y1}, 300, Laya.Ease.elasticOut, null, 400) + + this.star2.scaleX = 1.2 + this.star2.scaleY = 1.2 + Laya.Tween.to(this.star2, {scaleX: 1, scaleY: 1}, 300, Laya.Ease.elasticOut, null, 600) + const y2 = this.star2.y + this.star2.y = y2 - 10 + Laya.Tween.to(this.star2, {y: y2}, 300, Laya.Ease.elasticOut, null, 600) + + this.obj_light.alpha = 0 + Laya.Tween.to(this.obj_light, {alpha: 0.2}, 500, Laya.Ease.elasticOut, null, 800) + + this.btn_new.alpha = 0 + Laya.Tween.to(this.btn_new, {alpha: 1}, 300, Laya.Ease.elasticOut, null, 1000) } public onSetStageInfo(doStage: DOStage): void { diff --git a/src/views/common/AutoRotate.ts b/src/views/common/AutoRotate.ts new file mode 100644 index 0000000..458cbfa --- /dev/null +++ b/src/views/common/AutoRotate.ts @@ -0,0 +1,24 @@ +const { regClass, property } = Laya; + +@regClass() +export class AutoRotate extends Laya.Script { + declare owner : Laya.Image; + + @property(Number) + public speed: number = 1; + + private begin = 0 + + //第一次执行update之前执行,只会执行一次 + onStart(): void { + + Laya.timer.loop(100, this, ()=>{ + this.begin += this.speed + if (this.begin >= 360) { + this.begin = 0 + } + this.owner.rotation = this.begin + }) + } + +} \ No newline at end of file diff --git a/src/views/common/AutoRotate.ts.meta b/src/views/common/AutoRotate.ts.meta new file mode 100644 index 0000000..ee0b5dd --- /dev/null +++ b/src/views/common/AutoRotate.ts.meta @@ -0,0 +1,3 @@ +{ + "uuid": "b4f67ca3-86fe-409d-a439-63a715243fb7" +} \ No newline at end of file