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 }); }