From d8e249bcb288f9dcbab8f4eee6a803d3698cec34 Mon Sep 17 00:00:00 2001 From: keke Date: Thu, 17 Sep 2026 16:30:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=8E=A9=E6=B3=95=E4=BB=8B?= =?UTF-8?q?=E7=BB=8D=E9=81=93=E5=85=B7=E5=9B=BE=E5=B0=BA=E5=AF=B8=E8=A2=AB?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=A6=86=E7=9B=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/GameplayIntro/README.md | 2 +- assets/GameplayIntro/script/GameplayIntro.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/assets/GameplayIntro/README.md b/assets/GameplayIntro/README.md index f268545..47c000a 100644 --- a/assets/GameplayIntro/README.md +++ b/assets/GameplayIntro/README.md @@ -34,4 +34,4 @@ IntroViewport └─ Page3(相同结构) ``` -所有图片节点已经放在面板预制体内,SpriteFrame 留空。最下方 DescriptionImage 的大小由 Sprite 的 Size Mode、Trim 及节点尺寸/缩放控制,代码不覆盖;TitleImage 和 IconImage 仍以预制体 Width/Height 为展示区域等比适配;三页需要保持相同布局。代码仅复用三个页面、改变分页位置并动态加载图片。说明图不做代码缩放,标题和道具图保留等比适配;没有单图比例修正。翻远或关闭面板时清空图片并归还资源引用,不销毁这三个页面;面板整体销毁时由引擎销毁子节点。 +所有图片节点已经放在面板预制体内,SpriteFrame 留空。IconImage 和 DescriptionImage 的大小由 Sprite 的 Size Mode、Trim 及节点尺寸/缩放控制,代码不覆盖;TitleImage 仍以预制体 Width/Height 为展示区域等比适配;三页需要保持相同布局。代码仅复用三个页面、改变分页位置并动态加载图片。道具图和说明图不做代码缩放,标题图保留等比适配;没有单图比例修正。翻远或关闭面板时清空图片并归还资源引用,不销毁这三个页面;面板整体销毁时由引擎销毁子节点。 diff --git a/assets/GameplayIntro/script/GameplayIntro.ts b/assets/GameplayIntro/script/GameplayIntro.ts index 01c042d..858fa29 100644 --- a/assets/GameplayIntro/script/GameplayIntro.ts +++ b/assets/GameplayIntro/script/GameplayIntro.ts @@ -102,10 +102,10 @@ export default class GameplayIntro extends cc.Component { }); } - /** 替换预制体中的图片;说明图由组件控制大小;标题和道具图按预制体展示区域等比适配。 */ + /** 替换预制体中的图片;道具图和说明图由组件控制大小;标题图按预制体展示区域等比适配。 */ private picture(page: IntroPage, nodeName: string, path: string) { const node = page.node.getChildByName(nodeName); - const fitImage = nodeName !== "DescriptionImage"; + const fitImage = nodeName === "TitleImage"; if (fitImage && !this.imageLayouts.has(node)) { this.imageLayouts.set(node, { width: node.width, height: node.height, scale: node.scale }); } -- 2.43.0