From 708945313916c67aef8220703344f851c65e7c42 Mon Sep 17 00:00:00 2001 From: yangwen Date: Fri, 6 Jun 2025 16:58:46 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=83=A8=E5=88=86=E5=A5=96?= =?UTF-8?q?=E6=9D=AF=E8=8E=B7=E5=BE=97=E5=8A=A8=E7=94=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/resources/dc/TrophyClaim.lh | 26 ++++++++++++++++++++------ assets/resources/dc/TrophyClaim_H.lh | 17 ++++++++++++++--- src/views/dc/TrophyClaim.ts | 23 +++++++++++++++++++++++ 3 files changed, 57 insertions(+), 9 deletions(-) diff --git a/assets/resources/dc/TrophyClaim.lh b/assets/resources/dc/TrophyClaim.lh index e1a92b4..5ca13d8 100644 --- a/assets/resources/dc/TrophyClaim.lh +++ b/assets/resources/dc/TrophyClaim.lh @@ -3,8 +3,8 @@ "_$id": "6l8gfnd1", "_$type": "Box", "name": "TrophyClaim", - "width": 1080, - "height": 1920, + "width": 1920, + "height": 1080, "left": 0, "right": 0, "top": 0, @@ -29,8 +29,8 @@ "_$id": "l3kqo0ly", "_$type": "Image", "name": "Image", - "width": 1080, - "height": 1920, + "width": 1920, + "height": 1080, "alpha": 0.8, "left": 0, "right": 0, @@ -43,9 +43,12 @@ "_$id": "21y8h6ei", "_$type": "Box", "name": "center", - "y": 264, + "x": 960, + "y": 384, "width": 1080, "height": 1080, + "anchorX": 0.5, + "anchorY": 0.5, "centerX": 0, "centerY": -156, "_$child": [ @@ -53,13 +56,24 @@ "_$id": "vngawy58", "_$type": "Image", "name": "img_light_yellow", + "x": 540, + "y": 540, "width": 1080, "height": 1080, + "anchorX": 0.5, + "anchorY": 0.5, "centerX": 0, "centerY": 0, "skin": "res://0403c03d-0fbb-4930-8cf7-c4bf0f4d45b9", "useSourceSize": true, - "color": "#ffffff" + "color": "#ffffff", + "_$comp": [ + { + "_$type": "b4f67ca3-86fe-409d-a439-63a715243fb7", + "scriptPath": "../src/views/common/AutoRotate.ts", + "speed": 1 + } + ] }, { "_$id": "ta6ji66s", diff --git a/assets/resources/dc/TrophyClaim_H.lh b/assets/resources/dc/TrophyClaim_H.lh index 3f37d32..abd29bb 100644 --- a/assets/resources/dc/TrophyClaim_H.lh +++ b/assets/resources/dc/TrophyClaim_H.lh @@ -43,10 +43,12 @@ "_$id": "74q7qe1w", "_$type": "Box", "name": "center", - "x": 480, - "y": -58, + "x": 960, + "y": 422, "width": 960, "height": 960, + "anchorX": 0.5, + "anchorY": 0.5, "centerX": 0, "centerY": -118, "_$child": [ @@ -58,10 +60,19 @@ "y": 30, "width": 900, "height": 900, + "anchorX": 0.5, + "anchorY": 0.5, "centerX": 0, "centerY": 0, "skin": "res://0403c03d-0fbb-4930-8cf7-c4bf0f4d45b9", - "color": "#ffffff" + "color": "#ffffff", + "_$comp": [ + { + "_$type": "b4f67ca3-86fe-409d-a439-63a715243fb7", + "scriptPath": "../src/views/common/AutoRotate.ts", + "speed": 1 + } + ] }, { "_$id": "wiyybdn9", diff --git a/src/views/dc/TrophyClaim.ts b/src/views/dc/TrophyClaim.ts index 120d7a5..fbbfaa5 100644 --- a/src/views/dc/TrophyClaim.ts +++ b/src/views/dc/TrophyClaim.ts @@ -2,6 +2,7 @@ import type { TrophyRecord } from "../../types/global" import { config } from "../../constants/config" import { MONTH_LIST } from "../../models/DCManager" import { ResourceManager } from "../../models/ResourceManager" +import { Utility_EaseOut_2 } from "../../utils/utility" const { regClass, property } = Laya @@ -18,6 +19,28 @@ export class TrophyClaim extends Laya.Script { @property(Laya.Box) public btn_close: Laya.Box + private mask: Laya.Image + private center: Laya.Box + + onAwake(): void { + this.mask = this.owner.getChildByName("Image") as Laya.Image + this.mask.alpha = 0 + Laya.Tween.to(this.mask, {alpha: 0.8}, 600) + + this.center = this.owner.getChildByName("center") as Laya.Box + this.center.scaleX = 0 + this.center.scaleY = 0 + Laya.Tween.to(this.center, {scaleX: 1, scaleY: 1}, 200, Utility_EaseOut_2, null, 200) + + const label_titlle = this.center.getChildByName("label_titlle") as Laya.Label + label_titlle.alpha = 0 + Laya.Tween.to(label_titlle, {alpha: 1}, 600, Laya.Ease.linearNone, null, 600) + + const btn_close = this.center.getChildByName("btn_close") as Laya.Box + btn_close.alpha = 0 + Laya.Tween.to(btn_close, {alpha: 1}, 600, Laya.Ease.linearNone, null, 800) + } + public onSetShow(record: TrophyRecord): void { for (let i = 0; i < MONTH_LIST.length; i++) { const obj = MONTH_LIST[i]