diff --git a/CLAUDE.md b/CLAUDE.md index 529b76cd..e444fe13 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -39,11 +39,13 @@ assets/ ## Key Components ### AI Chat System + - **ChatAIService.ts**: Handles Google Gemini API integration for chat functionality - **ChatPanel.ts**: Main chat interface implementation - **index.ts**: Contains system prompts and character definitions ### Platform SDKs + - **SDKManager.ts**: Manages platform-specific SDK initialization - **wxSDK.ts**: WeChat Mini Game SDK integration - **bdSDK.ts**: Baidu SDK integration @@ -51,6 +53,7 @@ assets/ - **webSDK.ts**: Web platform SDK ### Game Flow + - **GameEntry.ts**: Game initialization and configuration - **MainScene.ts**: Main menu scene - **GameScene.ts**: Core game scene @@ -61,30 +64,37 @@ assets/ Since this is a Cocos Creator project, development is primarily done through the Cocos Creator IDE. Common tasks: ### Build & Run + - Open project in Cocos Creator 3.8.4 - Use Creator's built-in preview: Menu → Project → Preview - Build for platforms: Menu → Project → Build ### TypeScript Compilation + TypeScript compilation is handled automatically by Cocos Creator. Manual compilation isn't typically needed. ## Important Considerations ### API Keys + The project contains API keys in the code (Google Gemini API). These should be moved to environment variables or a secure configuration file. ### Character System + The game uses configurable character profiles defined in `index.ts` with different personality settings (Role_1, Role_2, Role_3). ### Multi-Platform Support + The codebase includes platform-specific code branches. When modifying core functionality, ensure compatibility across all supported platforms (Web, WeChat, Baidu, Kuaishou). ### Asset Management + - Assets are organized in bundles for dynamic loading - Resource management is handled through ResManager - Audio assets are managed separately through AudioManager ### UI System + - Uses Cocos Creator's UI system with custom components - Base view class: `li_BaseView.ts` - View navigation managed by ViewManager @@ -94,4 +104,8 @@ The codebase includes platform-specific code branches. When modifying core funct - TypeScript with non-strict mode (`"strict": false` in tsconfig) - Component-based architecture following Cocos Creator patterns - Singleton pattern for managers (e.g., `SDKManager.I`, `PlayerDataManager.I`) -- Event system using `li_EventManager` for decoupled communication \ No newline at end of file +- Event system using `li_EventManager` for decoupled communication + +## Plan Description + +- when user using plan mode create a plan, describe this plan in chinese. diff --git a/assets/Scripts/Main/Common/GameRootUI.ts b/assets/Scripts/Main/Common/GameRootUI.ts index ff30d64d..f05462b1 100644 --- a/assets/Scripts/Main/Common/GameRootUI.ts +++ b/assets/Scripts/Main/Common/GameRootUI.ts @@ -139,7 +139,7 @@ export default class GameRootUI extends Component { let viewSP = res.getComponent(res.name); viewSP && viewSP.openUIData && viewSP.openUIData(null); - this.AddUIToLayer(res, CommonConfig.UILayerGroup.Layer_ui1); + this.AddUIToLayer(res, CommonConfig.UILayerGroup.Layer_navigationbar); }); } } diff --git a/assets/Scripts/Main/Config/CommonConfig.ts b/assets/Scripts/Main/Config/CommonConfig.ts index 4e889154..d4e731b8 100644 --- a/assets/Scripts/Main/Config/CommonConfig.ts +++ b/assets/Scripts/Main/Config/CommonConfig.ts @@ -1,263 +1,257 @@ - /** * 公共配置文件 */ -export const G_GlobalNode: string = '__GLobal_Node'; +export const G_GlobalNode: string = "__GLobal_Node"; export namespace CommonConfig { - //本地保存 - export enum StorageConfigUtil { - BaseData = 'li_' + 1000, // 登录相关 - Channel = 2000, //渠道相关 - } - export enum StorageConfig { - SETTING_SHAKEON = StorageConfigUtil.BaseData + 1, - SETTING_MUSIC = StorageConfigUtil.BaseData + 2, - SETTING_SOUND = StorageConfigUtil.BaseData + 3, - GAME_CITY = StorageConfigUtil.BaseData + 4, //所在省 - GAME_RANK_CITY = StorageConfigUtil.BaseData + 5, //省排行数据 AI - GAME_RANK_USER = StorageConfigUtil.BaseData + 6, //玩家排行数据 AI - GAME_RANK_CDTIME = StorageConfigUtil.BaseData + 7, //上次排行数据刷新时间戳 AI - GAME_SCORE = StorageConfigUtil.BaseData + 8, //玩家积分 - GAME_SKIN_ID = StorageConfigUtil.BaseData + 9, //当前选择的皮肤id - GAME_PASSLV = StorageConfigUtil.BaseData + 10, //已完成关卡 - DAILYCHALLENGE_PASSLV = StorageConfigUtil.BaseData + 11, //已完成每日挑战关卡 - TOOL_KAIKONG = StorageConfigUtil.BaseData + 12, //开孔工具使用过 - TOOL_RENYIZHI = StorageConfigUtil.BaseData + 13, //任意指工具使用过 - TOOL_RENYIGUAN = StorageConfigUtil.BaseData + 14, //任意罐工具使用过 - DD_REGISTTIME = StorageConfigUtil.BaseData + 15, //注册时间字符串 - DD_LEVELOPER = StorageConfigUtil.BaseData + 16, //进入关卡且首次进度>0时(或第一次操作) - GUIDE_MAIN = StorageConfigUtil.BaseData + 17, //主界面引导是否完成 - GUIDE_TALK = StorageConfigUtil.BaseData + 18, //聊天界面引导是否完成 - LANGUAGE_SETTING = StorageConfigUtil.BaseData + 19, //语言设置 + //本地保存 + export enum StorageConfigUtil { + BaseData = "li_" + 1000, // 登录相关 + Channel = 2000, //渠道相关 + } + export enum StorageConfig { + SETTING_SHAKEON = StorageConfigUtil.BaseData + 1, + SETTING_MUSIC = StorageConfigUtil.BaseData + 2, + SETTING_SOUND = StorageConfigUtil.BaseData + 3, + GAME_CITY = StorageConfigUtil.BaseData + 4, //所在省 + GAME_RANK_CITY = StorageConfigUtil.BaseData + 5, //省排行数据 AI + GAME_RANK_USER = StorageConfigUtil.BaseData + 6, //玩家排行数据 AI + GAME_RANK_CDTIME = StorageConfigUtil.BaseData + 7, //上次排行数据刷新时间戳 AI + GAME_SCORE = StorageConfigUtil.BaseData + 8, //玩家积分 + GAME_SKIN_ID = StorageConfigUtil.BaseData + 9, //当前选择的皮肤id + GAME_PASSLV = StorageConfigUtil.BaseData + 10, //已完成关卡 + DAILYCHALLENGE_PASSLV = StorageConfigUtil.BaseData + 11, //已完成每日挑战关卡 + TOOL_KAIKONG = StorageConfigUtil.BaseData + 12, //开孔工具使用过 + TOOL_RENYIZHI = StorageConfigUtil.BaseData + 13, //任意指工具使用过 + TOOL_RENYIGUAN = StorageConfigUtil.BaseData + 14, //任意罐工具使用过 + DD_REGISTTIME = StorageConfigUtil.BaseData + 15, //注册时间字符串 + DD_LEVELOPER = StorageConfigUtil.BaseData + 16, //进入关卡且首次进度>0时(或第一次操作) + GUIDE_MAIN = StorageConfigUtil.BaseData + 17, //主界面引导是否完成 + GUIDE_TALK = StorageConfigUtil.BaseData + 18, //聊天界面引导是否完成 + LANGUAGE_SETTING = StorageConfigUtil.BaseData + 19, //语言设置 - DOUYIN_SIDEBAR = StorageConfigUtil.Channel + 1, //抖音渠道侧边栏奖励是否领取 - } + DOUYIN_SIDEBAR = StorageConfigUtil.Channel + 1, //抖音渠道侧边栏奖励是否领取 + } - - //UI层级 - export enum UILayerGroup { - Layer_ground = 0, - Layer_ui1 = 1, - Layer_ui2 = 2, - Layer_dialog = 3, - Layer_tips = 4, - Layer_top = 5, - } + //UI层级 + export enum UILayerGroup { + Layer_ground = 0, + Layer_ui1 = 1, + Layer_ui2 = 2, + Layer_dialog = 3, + Layer_tips = 4, + Layer_top = 5, + Layer_navigationbar = 6, + } } - /**关卡配置信息 */ export interface I_LevelConfig { - /**是关卡场景图资源的名称,注意关卡选择界面选中关卡后展示的场景图资源也是这个 */ - bgImage: string; - /**后续进入关卡后,关卡中需要播放的音乐资源名称 */ - bgm: string; - /**在关卡中,聊天历史信息展示里,角色使用的头像,圆形 80*80 */ - characterAvatar: string; - /**关卡中,提示信息界面里需要展示的角色性格文本 */ - characterDisposition: string; - /**角色聊天切换的表情立绘,这个暂时先不处理,后面我们需要和你沟通下,资源改成英文名看你怎么匹配(Ai 返回的判断还是中文的) */ - characterEmojiSet: string; - /**关卡中,提示信息界面,喜好话题部分需要展示的文本信息 */ - characterFavoriteTopic: string; - /**角色待机资源名称 */ - characterStandbyPortrait: string; - /**角色默认立绘资源名称 */ - characterFullLengthPortrait: string; - /**关卡提示信息界面里使用的角色半身胸像 */ - characterHalfLengthPortrait: string; - /**关卡提示信息界面里,厌恶话题的展示文本信息 */ - characterHateTopic: string; - /**角色名称,注意在关卡选择界面还有关卡中的聊天窗,关卡提示信息界面这几个地方都涉及展示 */ - characterName: string; - /**角色职业设定信息,关卡提示信息界面里的职业部分展示 */ - characterRole: string; - /**关卡选择界面里展示的关卡介绍文本信息 */ - description: string; - /**关卡中对话得到高分后,额外向玩家展示的鼓励信息 */ - encourageMessage: string; - /**结算图片 关卡 0 星,挑战失败的情况下在结算界面展示的 CG 资源名称 */ - failureCG: string; - /**结算图片 关卡 1 星,挑战成功的情况下在结算界面展示的 CG 资源名称 */ - oneStarCG: string; - /**结算图片 关卡 2 星,挑战成功的情况下在结算界面展示的 CG 资源名称 */ - twoStarCG: string; - /**结算图片 关卡 3 星,那么需要展示的 CG 资源对应的名称 */ - threeStarCG: string; - /**关卡中,对话得分特别低的情况下,额外给出的向玩家展示的鼓励信息 */ - hateMessage: string; - /**关卡选择界面,菱形的头像资源名称 */ - icon: string; - /**唯一的关卡 id 信息 */ - id: string; - /**关卡是否已解锁,注意锁定状态仍然能够选择关卡,关卡选择界面中的背景和立绘需要切换做展示,但是玩家不能开启游戏哈 */ - is_unlock: boolean; - /**npc名称 */ - name: string; - /**关卡展示顺序 */ - no: number; - /**关卡解锁需要通关的前置关卡 id 信息,对应id字段 */ - preLevelId: string; - /**进入关卡后,角色发出给到玩家的开场白信息(历史聊天记录页面中也需要显示,一定是角色发出的第一句话) */ - prologueMessage: string; - /**玩家在关卡中,点击随机填充按钮,需要随机选取一句,在输入框中填入,注意填入后不发送,玩家可修改,最终发送的信息还是以玩家点击发送按钮时,填入的信息为主 */ - randomInputPool: string[]; - /**关卡进行中的record_id,有值时要先获取一下之前的存档 */ - record_id: string; - /**关卡历史最高分 */ - score: number; - /**关卡历史最高星级 */ - star: number; - /**关卡中,关卡提示信息界面里底部展示的提示信息文本,目前测试数据和关卡介绍信息一致,但后续会区分开来 */ - tips: string; - /**Npc结算对话 3星时 */ - threeStarSummary: string; - /**Npc结算对话 2星时 */ - twoStarSummary: string; - /**Npc结算对话 1星时 */ - oneStarSummary: string; - /**Npc结算对话 0星时 */ - failureSummary: string; - /**Npc表情立绘 害羞 */ - characterShyPortrait: string; - /**Npc表情立绘 厌恶 */ - characterHatePortrait: string; - /**Npc表情立绘 开心 */ - characterHappyPortrait: string; - /**关卡解锁类型 -1=未解锁 0=自动解锁 1=游戏通关解锁 2=手动解锁 */ - unlock_type: number; - /**私家珍藏图片列表 */ - photoAwards: I_ZhengCangConfig[]; - /**关卡是否打过 */ - is_played: boolean; + /**是关卡场景图资源的名称,注意关卡选择界面选中关卡后展示的场景图资源也是这个 */ + bgImage: string; + /**后续进入关卡后,关卡中需要播放的音乐资源名称 */ + bgm: string; + /**在关卡中,聊天历史信息展示里,角色使用的头像,圆形 80*80 */ + characterAvatar: string; + /**关卡中,提示信息界面里需要展示的角色性格文本 */ + characterDisposition: string; + /**角色聊天切换的表情立绘,这个暂时先不处理,后面我们需要和你沟通下,资源改成英文名看你怎么匹配(Ai 返回的判断还是中文的) */ + characterEmojiSet: string; + /**关卡中,提示信息界面,喜好话题部分需要展示的文本信息 */ + characterFavoriteTopic: string; + /**角色待机资源名称 */ + characterStandbyPortrait: string; + /**角色默认立绘资源名称 */ + characterFullLengthPortrait: string; + /**关卡提示信息界面里使用的角色半身胸像 */ + characterHalfLengthPortrait: string; + /**关卡提示信息界面里,厌恶话题的展示文本信息 */ + characterHateTopic: string; + /**角色名称,注意在关卡选择界面还有关卡中的聊天窗,关卡提示信息界面这几个地方都涉及展示 */ + characterName: string; + /**角色职业设定信息,关卡提示信息界面里的职业部分展示 */ + characterRole: string; + /**关卡选择界面里展示的关卡介绍文本信息 */ + description: string; + /**关卡中对话得到高分后,额外向玩家展示的鼓励信息 */ + encourageMessage: string; + /**结算图片 关卡 0 星,挑战失败的情况下在结算界面展示的 CG 资源名称 */ + failureCG: string; + /**结算图片 关卡 1 星,挑战成功的情况下在结算界面展示的 CG 资源名称 */ + oneStarCG: string; + /**结算图片 关卡 2 星,挑战成功的情况下在结算界面展示的 CG 资源名称 */ + twoStarCG: string; + /**结算图片 关卡 3 星,那么需要展示的 CG 资源对应的名称 */ + threeStarCG: string; + /**关卡中,对话得分特别低的情况下,额外给出的向玩家展示的鼓励信息 */ + hateMessage: string; + /**关卡选择界面,菱形的头像资源名称 */ + icon: string; + /**唯一的关卡 id 信息 */ + id: string; + /**关卡是否已解锁,注意锁定状态仍然能够选择关卡,关卡选择界面中的背景和立绘需要切换做展示,但是玩家不能开启游戏哈 */ + is_unlock: boolean; + /**npc名称 */ + name: string; + /**关卡展示顺序 */ + no: number; + /**关卡解锁需要通关的前置关卡 id 信息,对应id字段 */ + preLevelId: string; + /**进入关卡后,角色发出给到玩家的开场白信息(历史聊天记录页面中也需要显示,一定是角色发出的第一句话) */ + prologueMessage: string; + /**玩家在关卡中,点击随机填充按钮,需要随机选取一句,在输入框中填入,注意填入后不发送,玩家可修改,最终发送的信息还是以玩家点击发送按钮时,填入的信息为主 */ + randomInputPool: string[]; + /**关卡进行中的record_id,有值时要先获取一下之前的存档 */ + record_id: string; + /**关卡历史最高分 */ + score: number; + /**关卡历史最高星级 */ + star: number; + /**关卡中,关卡提示信息界面里底部展示的提示信息文本,目前测试数据和关卡介绍信息一致,但后续会区分开来 */ + tips: string; + /**Npc结算对话 3星时 */ + threeStarSummary: string; + /**Npc结算对话 2星时 */ + twoStarSummary: string; + /**Npc结算对话 1星时 */ + oneStarSummary: string; + /**Npc结算对话 0星时 */ + failureSummary: string; + /**Npc表情立绘 害羞 */ + characterShyPortrait: string; + /**Npc表情立绘 厌恶 */ + characterHatePortrait: string; + /**Npc表情立绘 开心 */ + characterHappyPortrait: string; + /**关卡解锁类型 -1=未解锁 0=自动解锁 1=游戏通关解锁 2=手动解锁 */ + unlock_type: number; + /**私家珍藏图片列表 */ + photoAwards: I_ZhengCangConfig[]; + /**关卡是否打过 */ + is_played: boolean; } /**私家珍藏配置数据 */ export interface I_ZhengCangConfig { - /**图片名 */ - giftImgName: string; - /**故事文本列表 */ - giftStory: string[]; - /**简述 */ - giftSummary: string; - /**唯一id */ - id: number; - /**对应关卡id */ - levelId: string; + /**图片名 */ + giftImgName: string; + /**故事文本列表 */ + giftStory: string[]; + /**简述 */ + giftSummary: string; + /**唯一id */ + id: number; + /**对应关卡id */ + levelId: string; } - /**关卡对话数据 */ export interface I_LevelStepData { - /**当前聊天次数 */ - current_cnt: number; - /**结束评分 */ - end_star: number; - /**关卡id */ - id: string; - /**最大聊天次数 */ - max_cnt: number; - /**当前状态 0:成功 1:进行中 2:失败 3:剩余聊天次数不足 */ - status: number; - /**可用总聊天次数 */ - total_cnt: number; - /**心动次数 */ - heartbeat_cnt: number; - /**剩余可看广告次数 */ - ad_num: number; - /**剩余可分享次数 */ - share_num: number; - /**剩余可撤回次数 */ - can_use_cancel_cnt: number; - /**剩余可暴击次数 */ - can_use_strength_cnt: number; - /**暴击是否生效 */ - is_strength_take_effect: boolean; - /**甜蜜暴击已用次数 */ - first_strength?: number; - /**撤回已用次数 */ - first_cancel?: number; + /**当前聊天次数 */ + current_cnt: number; + /**结束评分 */ + end_star: number; + /**关卡id */ + id: string; + /**最大聊天次数 */ + max_cnt: number; + /**当前状态 0:成功 1:进行中 2:失败 3:剩余聊天次数不足 */ + status: number; + /**可用总聊天次数 */ + total_cnt: number; + /**心动次数 */ + heartbeat_cnt: number; + /**剩余可看广告次数 */ + ad_num: number; + /**剩余可分享次数 */ + share_num: number; + /**剩余可撤回次数 */ + can_use_cancel_cnt: number; + /**剩余可暴击次数 */ + can_use_strength_cnt: number; + /**暴击是否生效 */ + is_strength_take_effect: boolean; + /**甜蜜暴击已用次数 */ + first_strength?: number; + /**撤回已用次数 */ + first_cancel?: number; } - /**npc长连接中的回复 */ export interface I_NpcTalkBack { - /**ai表情 */ - aiEmoji:string; - /**ai回复 */ - aiResponse:string; - /**ai评分 */ - aiScore:number; - /**ai基础评分 */ - aiBaseScore:number; - /**ai额外加分 */ - aiAdditionalScore:number; - /**是否完成 */ - isFinished:boolean; - /**聊天次数 */ - sourceCnt:number; - /**玩家发的文本 */ - userInput: string; - /**评价 -1=未生成 0=心动 1=普通 2=厌恶 */ - judgement: number; + /**ai表情 */ + aiEmoji: string; + /**ai回复 */ + aiResponse: string; + /**ai评分 */ + aiScore: number; + /**ai基础评分 */ + aiBaseScore: number; + /**ai额外加分 */ + aiAdditionalScore: number; + /**是否完成 */ + isFinished: boolean; + /**聊天次数 */ + sourceCnt: number; + /**玩家发的文本 */ + userInput: string; + /**评价 -1=未生成 0=心动 1=普通 2=厌恶 */ + judgement: number; } - /**对话历史记录数据 */ export interface I_TalkRecordInfo { - /**对话内容 */ - talk: string; - /**是否是玩家自己 */ - isMe: boolean; - /**评分 小于0时不显示 */ - score: number; - /**基础分 */ - scoreBase: number; - /**额外加分 */ - scoreAdditional: number; + /**对话内容 */ + talk: string; + /**是否是玩家自己 */ + isMe: boolean; + /**评分 小于0时不显示 */ + score: number; + /**基础分 */ + scoreBase: number; + /**额外加分 */ + scoreAdditional: number; } - /**玩家信息数据 */ export interface I_UserInfo { - id: number; - score: number; - status: number; - /**头像url */ - avatar: string; - /**昵称 */ - nickname: string; - /**剩余进入关卡次数 */ - ticket: number; - /**剩余可看广告次数 - 进入关卡 */ - game_ad_num: number; - /**剩余可分享次数 - 进入关卡 */ - game_share_num: number; - /**剩余可看广告次数 - 聊天 */ - level_ad_num: number; - /**剩余可分享次数 - 聊天 */ - level_share_num: number; - /**抖音侧边栏奖励是否已领取 0未领取 1已领取 */ - is_receive: number; - /**友盟关卡记录 */ - levels: any[]; - /**私家珍藏红点标记 0不显示 1显示 */ - private_collection_mark: number; - /**心动回忆红点标记 0不显示 1显示 */ - heartbeat_memories_mark: number; - /**剩余可免费获取珍藏的次数 */ - free_private_collection: number; - // [property: string]: any; + id: number; + score: number; + status: number; + /**头像url */ + avatar: string; + /**昵称 */ + nickname: string; + /**剩余进入关卡次数 */ + ticket: number; + /**剩余可看广告次数 - 进入关卡 */ + game_ad_num: number; + /**剩余可分享次数 - 进入关卡 */ + game_share_num: number; + /**剩余可看广告次数 - 聊天 */ + level_ad_num: number; + /**剩余可分享次数 - 聊天 */ + level_share_num: number; + /**抖音侧边栏奖励是否已领取 0未领取 1已领取 */ + is_receive: number; + /**友盟关卡记录 */ + levels: any[]; + /**私家珍藏红点标记 0不显示 1显示 */ + private_collection_mark: number; + /**心动回忆红点标记 0不显示 1显示 */ + heartbeat_memories_mark: number; + /**剩余可免费获取珍藏的次数 */ + free_private_collection: number; + // [property: string]: any; } /**心动回忆数据 */ export interface I_HuiyiInfo { - /**关卡id */ - lvId: string; - /**星数 */ - star: number; - /**是否解锁 */ - unlock: boolean; -} \ No newline at end of file + /**关卡id */ + lvId: string; + /**星数 */ + star: number; + /**是否解锁 */ + unlock: boolean; +} diff --git a/assets/Scripts/Main/Config/InnerMsgCode.ts b/assets/Scripts/Main/Config/InnerMsgCode.ts index c1f1ac73..36d91999 100644 --- a/assets/Scripts/Main/Config/InnerMsgCode.ts +++ b/assets/Scripts/Main/Config/InnerMsgCode.ts @@ -30,6 +30,8 @@ export enum InnerMsgCode { BalanceChange, // 余额发生变化 VipExpireChange, // vip失效时间戳发生变化 ChatTotalCountChange, // 总聊天次数发生变化 + + Navigation_PanelSwitch, // 导航面板切换事件 } export enum InnerEventCode { diff --git a/assets/Scripts/Sub/MainScene.ts b/assets/Scripts/Sub/MainScene.ts index 87093d51..1bdc8a4e 100644 --- a/assets/Scripts/Sub/MainScene.ts +++ b/assets/Scripts/Sub/MainScene.ts @@ -1,5 +1,6 @@ import { _decorator, Camera, Component, Node } from "cc"; import GameRootUI from "../Main/Common/GameRootUI"; +import { MainController } from "../chat18x/core/MainController"; const { ccclass, property } = _decorator; @@ -18,8 +19,24 @@ export class MainScene extends Component { let gameRootUI = this.node.getComponent(GameRootUI); if (!gameRootUI) { gameRootUI = this.node.addComponent(GameRootUI); - gameRootUI.InitByCreate(this.UIRoot, this.UILayerMod, "ThemePanel"); + gameRootUI.InitByCreate(this.UIRoot, this.UILayerMod, "NavigationPanel"); } GameRootUI.MainCamera = this.MainCamera; + + // 初始化MainController并预加载数据 + this.initMainController(); + } + + /** + * 初始化MainController并预加载数据 + */ + private async initMainController(): Promise { + try { + console.log("[MainScene] 开始初始化MainController"); + await MainController.I.init(); + console.log("[MainScene] MainController初始化完成"); + } catch (error) { + console.error("[MainScene] MainController初始化失败:", error); + } } } diff --git a/assets/Scripts/chat18x/core/MainController.ts b/assets/Scripts/chat18x/core/MainController.ts new file mode 100644 index 00000000..ceef2b4d --- /dev/null +++ b/assets/Scripts/chat18x/core/MainController.ts @@ -0,0 +1,218 @@ +import { _decorator, Component, Node } from "cc"; +import { ThemeService } from "../network/services/ThemeService"; +import { GirlService } from "../network/services/GirlService"; +import { ShopService } from "../network/services/ShopService"; +import { DataManager, DataId } from "../data/DataManager"; +import { ThemeData } from "../data/ThemeData"; +import { GirlData } from "../data/GirlData"; +import { ShopData } from "../data/ShopData"; +import proto from "db://assets/Scripts/proto/proto.pb.js"; + +const { ccclass, property } = _decorator; + +@ccclass("MainController") +export class MainController { + private static _instance: MainController; + public static get I(): MainController { + if (!MainController._instance) { + MainController._instance = new MainController(); + } + return MainController._instance; + } + private constructor() {} + + // 数据预加载状态标记 + private isThemeDataPreloaded: boolean = false; + private isDailyRecommendPreloaded: boolean = false; + private isShopListPreloaded: boolean = false; + + /** + * 初始化并预加载数据 + */ + async init(): Promise { + console.log("[MainController] 开始初始化并预加载数据"); + + // 并行预加载所有数据 + await Promise.all([ + this.preloadThemeData(), + this.preloadDailyRecommend(), + this.preloadShopList() + ]); + + console.log("[MainController] 数据预加载完成"); + } + + /** + * 预加载主题数据 + */ + async preloadThemeData(): Promise { + if (this.isThemeDataPreloaded) { + console.log("[MainController] 主题数据已预加载"); + return true; + } + + try { + console.log("[MainController] 开始预加载主题数据"); + const reqData = {}; + const res = await ThemeService.I.reqHallTheme(reqData); + + if (res && res.code === proto.cs.EnmRetCode.SUCCESS) { + // 保存数据到DataManager + const themeData = DataManager.I.getDataById(DataId.Theme); + themeData.themes = res.data; + this.isThemeDataPreloaded = true; + console.log("[MainController] 主题数据预加载成功"); + return true; + } else { + console.warn("[MainController] 主题数据预加载失败:", res); + return false; + } + } catch (error) { + console.error("[MainController] 主题数据预加载异常:", error); + return false; + } + } + + /** + * 预加载每日推荐 + */ + async preloadDailyRecommend(): Promise { + if (this.isDailyRecommendPreloaded) { + console.log("[MainController] 每日推荐数据已预加载"); + return true; + } + + try { + console.log("[MainController] 开始预加载每日推荐数据"); + const reqData = {}; + const res = await GirlService.I.reqDailyRecommend(reqData); + + if (res && res.code === proto.cs.EnmRetCode.SUCCESS) { + // 保存数据到DataManager + const girlData = DataManager.I.getDataById(DataId.Girl); + girlData.setDailyRecommend(res.data); + this.isDailyRecommendPreloaded = true; + console.log("[MainController] 每日推荐数据预加载成功"); + return true; + } else { + console.warn("[MainController] 每日推荐数据预加载失败:", res); + return false; + } + } catch (error) { + console.error("[MainController] 每日推荐数据预加载异常:", error); + return false; + } + } + + /** + * 预加载商品列表 + */ + async preloadShopList(): Promise { + if (this.isShopListPreloaded) { + console.log("[MainController] 商品列表数据已预加载"); + return true; + } + + try { + console.log("[MainController] 开始预加载商品列表数据"); + const reqData = {}; + const res = await ShopService.I.reqShopList(reqData); + + if (res && res.code === proto.cs.EnmRetCode.SUCCESS) { + // 保存数据到DataManager + const shopData = DataManager.I.getDataById(DataId.Shop); + shopData.goods = res.data; + this.isShopListPreloaded = true; + console.log("[MainController] 商品列表数据预加载成功"); + return true; + } else { + console.warn("[MainController] 商品列表数据预加载失败:", res); + return false; + } + } catch (error) { + console.error("[MainController] 商品列表数据预加载异常:", error); + return false; + } + } + + /** + * 检查数据是否已预加载 + */ + isDataPreloaded(): boolean { + return this.isThemeDataPreloaded && this.isDailyRecommendPreloaded && this.isShopListPreloaded; + } + + /** + * 获取预加载状态 + */ + getPreloadStatus() { + return { + themeData: this.isThemeDataPreloaded, + dailyRecommend: this.isDailyRecommendPreloaded, + shopList: this.isShopListPreloaded, + allComplete: this.isDataPreloaded() + }; + } + + /** + * 重置预加载状态(用于重新加载数据) + */ + resetPreloadStatus(): void { + this.isThemeDataPreloaded = false; + this.isDailyRecommendPreloaded = false; + this.isShopListPreloaded = false; + console.log("[MainController] 预加载状态已重置"); + } + + /** + * 强制刷新主题数据 + */ + async refreshThemeData(): Promise { + console.log("[MainController] 开始强制刷新主题数据"); + try { + const reqData = {}; + const res = await ThemeService.I.reqHallTheme(reqData); + + if (res && res.code === proto.cs.EnmRetCode.SUCCESS) { + // 保存数据到DataManager + const themeData = DataManager.I.getDataById(DataId.Theme); + themeData.themes = res.data; + this.isThemeDataPreloaded = true; + console.log("[MainController] 主题数据刷新成功"); + return true; + } else { + console.warn("[MainController] 主题数据刷新失败:", res); + return false; + } + } catch (error) { + console.error("[MainController] 主题数据刷新异常:", error); + return false; + } + } + + /** + * 强制刷新每日推荐数据 + */ + async refreshDailyRecommend(): Promise { + console.log("[MainController] 开始强制刷新每日推荐数据"); + try { + const reqData = {}; + const res = await GirlService.I.reqDailyRecommend(reqData); + + if (res && res.code === proto.cs.EnmRetCode.SUCCESS) { + // 保存数据到DataManager + const girlData = DataManager.I.getDataById(DataId.Girl); + girlData.setDailyRecommend(res.data); + this.isDailyRecommendPreloaded = true; + console.log("[MainController] 每日推荐数据刷新成功"); + return true; + } else { + console.warn("[MainController] 每日推荐数据刷新失败:", res); + return false; + } + } catch (error) { + console.error("[MainController] 每日推荐数据刷新异常:", error); + return false; + } + } +} diff --git a/assets/Scripts/chat18x/core/MainController.ts.meta b/assets/Scripts/chat18x/core/MainController.ts.meta new file mode 100644 index 00000000..31fcfbd9 --- /dev/null +++ b/assets/Scripts/chat18x/core/MainController.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.24", + "importer": "typescript", + "imported": true, + "uuid": "d3917420-e17a-46f9-8864-4f4997a10ddc", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/assets/Scripts/chat18x/manager/DetailImageItemPool.ts b/assets/Scripts/chat18x/manager/DetailImageItemPool.ts new file mode 100644 index 00000000..e5cc6149 --- /dev/null +++ b/assets/Scripts/chat18x/manager/DetailImageItemPool.ts @@ -0,0 +1,60 @@ +import { NodePool, instantiate, Node, isValid } from "cc"; +import { DetailImageItem } from "../uiitems/DetailImageItem"; + +export class DetailImageItemPool { + private static _instance: DetailImageItemPool = null; + + private _pool: NodePool; + private _template: Node = null; + + private constructor() { + this._pool = new NodePool(); + } + + public static get Instance(): DetailImageItemPool { + if (!this._instance) { + this._instance = new DetailImageItemPool(); + } + return this._instance; + } + + public setTemplate(template: Node): void { + this._template = template; + } + + public get(): Node { + let node: Node = null; + + if (this._pool.size() > 0) { + node = this._pool.get(); + } else { + if (this._template) { + node = instantiate(this._template); + } + } + + if (node) { + const item = node.getComponent(DetailImageItem); + if (item && item.reset) { + item.reset(); + } + } + + return node; + } + + public put(node: Node): void { + if (node && isValid(node)) { + node.removeFromParent(); + this._pool.put(node); + } + } + + public clear(): void { + this._pool.clear(); + } + + public getPoolSize(): number { + return this._pool.size(); + } +} \ No newline at end of file diff --git a/assets/Scripts/chat18x/manager/DetailImageItemPool.ts.meta b/assets/Scripts/chat18x/manager/DetailImageItemPool.ts.meta new file mode 100644 index 00000000..f7afd72e --- /dev/null +++ b/assets/Scripts/chat18x/manager/DetailImageItemPool.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.24", + "importer": "typescript", + "imported": true, + "uuid": "da0fc97b-079e-4f2f-b288-779e5729c21b", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/assets/Scripts/chat18x/manager/NavigationManager.ts b/assets/Scripts/chat18x/manager/NavigationManager.ts index 3b2c9ec0..57e99563 100644 --- a/assets/Scripts/chat18x/manager/NavigationManager.ts +++ b/assets/Scripts/chat18x/manager/NavigationManager.ts @@ -1,6 +1,11 @@ import { ViewManager } from "db://assets/Scripts/Main/Manager/ViewManager"; import { UITransitionHelper } from "../utils/UITransitionHelper"; import GameRootUI from "../../Main/Common/GameRootUI"; +import { Node } from "cc"; +import li_EventManager from "../../Main/Common/li_EventManager"; +import { InnerMsgCode } from "../../Main/Config/InnerMsgCode"; +import { ThemePanel } from "../ui/panels/ThemePanel"; +import { GirlListPanel } from "../ui/panels/GirlListPanel"; /** * 页面过渡动画类型枚举 @@ -11,6 +16,16 @@ export enum PageTransitionType { SLIDE_RIGHT = "slide_right", } +/** + * NavigationPanel面板类型枚举 + */ +export enum PanelType { + THEME = "ThemePanel", + GIRL_DETAIL = "GirlDetailPanel", + CHAT = "ChatPanel", + SETTING = "SettingPanel", +} + /** * 页面过渡动画配置接口 */ @@ -25,6 +40,7 @@ export interface PageTransitionConfig { * 导航管理器 * * 负责管理游戏中的页面导航和路由,将导航逻辑从业务逻辑中分离出来 + * 统一管理NavigationPanel和其他面板的切换 * * @author AI Chat System * @version 1.0.0 @@ -32,6 +48,19 @@ export interface PageTransitionConfig { export class NavigationManager { private static _instance: NavigationManager; + // NavigationPanel相关属性 + private navigationPanel: any = null; // NavigationPanel实例引用 + private currentActivePanel: PanelType = PanelType.THEME; + private panelCache: Map = new Map(); // 面板缓存 + private currentVisiblePanel: Node = null; + + // 选中的角色相关信息 + private selectedGirlId: number = 1; // 当前选中的角色ID + private selectedThemeId: number = 1; // 当前选中的主题ID + + private themePanel: ThemePanel = null; + private girlListPanel: GirlListPanel = null; + /** * 获取NavigationManager的单例实例 * @@ -45,177 +74,323 @@ export class NavigationManager { return this._instance; } - private constructor() {} + private constructor() { + // 初始化事件监听 + this.initEventListeners(); + } /** - * 通用页面导航方法,支持过渡动画 - * - * @param {string} targetPanel - 目标面板名称 - * @param {any} navigationData - 导航数据 - * @param {PageTransitionConfig} transitionConfig - 过渡动画配置 - * @param {any} currentPanel - 当前面板实例(可选) - * @param {Function} onComplete - 完成回调(可选) - * - * @example - * ```typescript - * NavigationManager.Instance.navigateWithTransition( - * "ChatPanel", - * { roleId: 10001 }, - * { incomingTransition: PageTransitionType.SLIDE_RIGHT, outgoingTransition: PageTransitionType.SLIDE_LEFT }, - * currentPanel - * ); - * ``` + * 初始化事件监听 */ - public navigateWithTransition( - targetPanel: string, - navigationData: any, - transitionConfig: PageTransitionConfig, - currentPanel?: any, - onComplete?: Function - ): void { - if (!targetPanel) { - console.warn("NavigationManager: Target panel name is required"); + private initEventListeners(): void { + // + } + + /** + * 注册NavigationPanel实例 + * @param panel NavigationPanel实例 + */ + public registerNavigationPanel(panel: any): void { + this.navigationPanel = panel; + console.log("[NavigationManager] NavigationPanel registered"); + } + + /** + * 统一的面板切换方法 + * @param panelType 目标面板类型 + */ + public switchToPanel(panelType: PanelType, force: boolean = false): void { + if (this.currentActivePanel === panelType && !force) { return; } - console.log( - `Navigating to ${targetPanel} with transition:`, - transitionConfig - ); - //const correntPos = currentPanel.node.position; - const duration = transitionConfig.duration || 0.1; - const useTransition = - transitionConfig.incomingTransition !== PageTransitionType.NONE || - transitionConfig.outgoingTransition !== PageTransitionType.NONE; - - if (!useTransition) { - ViewManager.I.openBundlesView(targetPanel, navigationData, onComplete); - if ( - currentPanel && - currentPanel.onClose && - typeof currentPanel.onClose === "function" - ) { - currentPanel.onClose(); - //currentPanel.node.position = correntPos; - } - return; - } - - ViewManager.I.openBundlesView(targetPanel, navigationData, (targetNode) => { - this._executeTransition( - targetNode, - currentPanel, - transitionConfig, - duration, - onComplete + if (!this.navigationPanel) { + console.warn( + "[NavigationManager] NavigationPanel not registered, fallback to direct ViewManager call" ); + this.fallbackSwitchPanel(panelType); + return; + } + + // 通知NavigationPanel显示加载状态 + this.navigationPanel.showLoading?.(); + + // 计算动画方向 + const currentIndex = this.getPanelIndex(this.currentActivePanel); + const targetIndex = this.getPanelIndex(panelType); + const isMovingRight = currentIndex < targetIndex; + + const hideDirection = isMovingRight ? "left" : "right"; + const showDirection = isMovingRight ? "right" : "left"; + + // 隐藏当前面板(包括子页面) + this.hideCurrentPanelWithChildren(hideDirection); + + // 加载并显示目标面板 + this.loadOrGetPanel(panelType, (panel: Node) => { + this.currentActivePanel = panelType; + this.currentVisiblePanel = panel; + + // 更新NavigationPanel按钮状态 + this.navigationPanel.updateButtonStates?.(panelType); + + // 显示面板 + this.showPanelWithAnimation(panel, showDirection, () => { + this.navigationPanel.hideLoading?.(); + }); }); } /** - * 执行页面过渡动画的私有方法 - * - * @private - * @param {any} targetNode - 目标节点 - * @param {any} currentPanel - 当前面板 - * @param {PageTransitionConfig} config - 动画配置 - * @param {number} duration - 动画时长 - * @param {Function} onComplete - 完成回调 + * 获取面板索引(用于动画方向计算) */ - private _executeTransition( - targetNode: any, - currentPanel: any, - config: PageTransitionConfig, - duration: number, - onComplete?: Function - ): void { - const executeIncomingAnimation = (callback?: Function) => { - if ( - config.incomingTransition === PageTransitionType.NONE || - !targetNode - ) { - callback && callback(); - return; - } + private getPanelIndex(panelType: PanelType): number { + switch (panelType) { + case PanelType.THEME: + return 0; + case PanelType.GIRL_DETAIL: + return 1; + case PanelType.CHAT: + return 2; + case PanelType.SETTING: + return 3; + default: + return 0; + } + } - switch (config.incomingTransition) { - case PageTransitionType.SLIDE_RIGHT: - UITransitionHelper.slideInFromRight(targetNode, duration, callback); - break; - case PageTransitionType.SLIDE_LEFT: - UITransitionHelper.slideInFromLeft(targetNode, duration, callback); - break; + /** + * 获取面板名称 + */ + private getPanelName(panelType: PanelType): string { + return panelType as string; + } - default: - callback && callback(); - break; - } - }; + /** + * 获取面板数据 + */ + private getPanelData(panelType: PanelType): any { + switch (panelType) { + case PanelType.GIRL_DETAIL: + return this.selectedGirlId; // 使用当前选中的角色ID + case PanelType.CHAT: + return { girlId: this.selectedGirlId }; // 使用当前选中的角色ID + default: + return null; + } + } - const executeOutgoingAnimation = (callback?: Function) => { - if ( - config.outgoingTransition === PageTransitionType.NONE || - !currentPanel || - !currentPanel.node || - !currentPanel.node.isValid - ) { - callback && callback(); - return; - } - - switch (config.outgoingTransition) { - case PageTransitionType.SLIDE_LEFT: - UITransitionHelper.slideOutToLeft( - currentPanel.node, - duration, - callback - ); - break; - case PageTransitionType.SLIDE_RIGHT: - UITransitionHelper.slideOutToRight( - currentPanel.node, - duration, - callback - ); - break; - - default: - callback && callback(); - break; - } - }; - - const closeCurrentPanel = () => { - if ( - currentPanel && - currentPanel.onClose && - typeof currentPanel.onClose === "function" - ) { - if (currentPanel.node.name !== "ThemePanel") currentPanel.onClose(); - } - onComplete && onComplete(); - }; - - if (config.simultaneous) { - let completedAnimations = 0; - const animationComplete = () => { - completedAnimations++; - if (completedAnimations >= 2) { - closeCurrentPanel(); + /** + * 加载或获取面板 + */ + private loadOrGetPanel( + panelType: PanelType, + callback: (panel: Node) => void + ) { + // 检查缓存 + if (this.panelCache.has(panelType)) { + const cachedPanel = this.panelCache.get(panelType); + if (cachedPanel && cachedPanel.isValid) { + // 特殊处理:主题面板刷新(避免重复调用Show) + if (panelType === PanelType.THEME) { + const themePanel = cachedPanel.getComponent(ThemePanel); + if (themePanel) { + // 不在这里调用Show(),因为ThemePanel已经有加载状态保护 + // 只在必要时调用onHide()确保子页面状态正确 + if (typeof themePanel.onHide === "function") { + console.log("[NavigationManager] 确保主题面板子页面状态正确"); + themePanel.onHide(); + } + } } - }; + callback(cachedPanel); + return; + } else { + this.panelCache.delete(panelType); + } + } - executeIncomingAnimation(animationComplete); - executeOutgoingAnimation(animationComplete); + // 加载新面板 + const panelName = this.getPanelName(panelType); + const openData = this.getPanelData(panelType); + + ViewManager.I.openBundlesView(panelName, openData, (panel: Node) => { + if (panel && panel.isValid) { + this.panelCache.set(panelType, panel); + + if (panelName === "ThemePanel") { + this.themePanel = panel.getComponent(ThemePanel); + } + + callback(panel); + } + }); + } + + /** + * 隐藏当前面板及其子页面 + */ + private hideCurrentPanelWithChildren(direction: "left" | "right") { + if (!this.currentVisiblePanel) { + return; + } + + // 如果当前是ThemePanel,需要同时处理可能的子页面(GirlListPanel) + if (this.currentActivePanel === PanelType.THEME) { + // 查找并隐藏GirlListPanel子页面 + this.hideThemePanelChildren(direction); + + // 隐藏ThemePanel主面板 + this.hidePanelWithAnimation(this.currentVisiblePanel, direction); } else { - executeOutgoingAnimation(() => { - executeIncomingAnimation(closeCurrentPanel); + // 其他面板直接隐藏 + this.hidePanelWithAnimation(this.currentVisiblePanel, direction); + } + } + + /** + * 隐藏ThemePanel的子页面 + */ + private hideThemePanelChildren(direction: "left" | "right") { + const themePanel = this.findThemePanelNode(); + if (themePanel) { + // 获取子页面节点 + const childPanel = this.getThemePanelChildNode(themePanel); + if (childPanel && childPanel.active) { + console.log( + "[NavigationManager] Hiding ThemePanel child with animation" + ); + this.hidePanelWithAnimation(childPanel, direction); + } + } + } + + /** + * 获取ThemePanel的子页面节点 + */ + private getThemePanelChildNode(themePanel: ThemePanel): Node | null { + try { + // ThemePanel存储子页面在currentChildPanel属性中 + const childPanel = themePanel.getChildPanel(); + if (childPanel) return childPanel.node; + return null; + } catch (error) { + console.error( + "[NavigationManager] Error getting child panel node:", + error + ); + return null; + } + } + + /** + * 隐藏面板动画 + */ + private hidePanelWithAnimation( + panel: Node, + direction: "left" | "right", + callback?: Function + ) { + if (!panel || !panel.isValid || !panel.active) { + callback && callback(); + return; + } + + if (direction === "left") { + UITransitionHelper.slideOutToLeft(panel, 0.3, () => { + panel.active = false; + callback && callback(); + }); + } else { + UITransitionHelper.slideOutToRight(panel, 0.3, () => { + panel.active = false; + callback && callback(); }); } } /** - * 进入角色列表页面 + * 显示面板动画 + */ + private showPanelWithAnimation( + panel: Node, + direction: "left" | "right", + callback?: Function + ) { + if (!panel || !panel.isValid) { + callback && callback(); + return; + } + + panel.active = true; + + if (panel.name === "ThemePanel" && this.girlListPanel) { + this.showPanelWithAnimation(this.girlListPanel.node, direction, callback); + } + + if (direction === "right") { + UITransitionHelper.slideInFromRight(panel, 0.3, () => { + callback && callback(); + }); + } else { + UITransitionHelper.slideInFromLeft(panel, 0.3, () => { + callback && callback(); + }); + } + } + + /** + * 后备切换方法(当NavigationPanel未注册时) + */ + private fallbackSwitchPanel(panelType: PanelType): void { + const panelName = this.getPanelName(panelType); + const openData = this.getPanelData(panelType); + ViewManager.I.openBundlesView(panelName, openData); + } + + /** + * 获取当前激活的面板类型 + */ + public getCurrentActivePanel(): PanelType { + return this.currentActivePanel; + } + + /** + * 设置选中的角色ID + * @param girlId 角色ID + */ + public setSelectedGirlId(girlId: number): void { + this.selectedGirlId = girlId; + console.log("[NavigationManager] Selected girl ID set to:", girlId); + } + + /** + * 获取当前选中的角色ID + * @returns 当前选中的角色ID + */ + public getSelectedGirlId(): number { + return this.selectedGirlId; + } + + /** + * 设置选中的主题ID + * @param themeId 主题ID + */ + public setSelectedCategoryId(themeId: number): void { + this.selectedThemeId = themeId; + console.log("[NavigationManager] Selected theme ID set to:", themeId); + } + + /** + * 获取当前选中的主题ID + * @returns 当前选中的主题ID + */ + public getSelectedThemeId(): number { + return this.selectedThemeId; + } + + /** + * 进入角色列表页面(作为 ThemePanel 的子页面) * * @param {number} themeId - 主题ID,用于筛选角色 * @@ -224,290 +399,141 @@ export class NavigationManager { * NavigationManager.Instance.navigateToGirlList(1); * ``` */ - public navigateToGirlList(themeId: number): void; - /** - * 进入角色列表页面(带过渡动画) - * - * @param {number} themeId - 主题ID,用于筛选角色 - * @param {PageTransitionConfig} transitionConfig - 过渡动画配置 - * @param {any} currentPanel - 当前面板实例(可选) - * - * @example - * ```typescript - * NavigationManager.Instance.navigateToGirlList(1, - * { incomingTransition: PageTransitionType.SLIDE_RIGHT, outgoingTransition: PageTransitionType.FADE }, - * this - * ); - * ``` - */ - public navigateToGirlList( - themeId: number, - transitionConfig?: PageTransitionConfig, - currentPanel?: any - ): void; - public navigateToGirlList( - themeId: number, - transitionConfig?: PageTransitionConfig, - currentPanel?: any - ): void { + public navigateToGirlList(themeId: number): void { if (themeId == null || themeId < 0) { console.warn("Invalid theme ID for girl list navigation:", themeId); return; } - console.log(`Navigating to girl list with theme ID: ${themeId}`); + // 更新选中的主题ID + this.setSelectedCategoryId(themeId); - if (transitionConfig) { - const navigationData = { - category: themeId, - withTransition: true, - }; - this.navigateWithTransition( + console.log( + `[NavigationManager] Navigating to girl list with theme ID: ${themeId}` + ); + + // 先检查是否已有GirlListPanel存在 + const existingGirlListPanel = this.findExistingGirlListPanel(); + + if (existingGirlListPanel) { + // 如果面板已存在,重新显示并刷新数据 + console.log("[NavigationManager] Reactivating existing GirlListPanel"); + this.reactivateGirlListPanel(existingGirlListPanel, themeId); + } else { + // 如果面板不存在,创建新的 + console.log("[NavigationManager] Creating new GirlListPanel"); + ViewManager.I.openBundlesView( "GirlListPanel", - themeId, - transitionConfig, - currentPanel, - () => { - GameRootUI.I.hideDefaultView(); + { + themeId: themeId, + parentPanel: "ThemePanel", // 标记父页面 + }, + (girlListPanelNode) => { + this.girlListPanel = girlListPanelNode.getComponent(GirlListPanel); + // 获取 ThemePanel 实例并设置子页面关系 + console.log( + "[NavigationManager] GirlListPanel opened, setting up parent-child relationship" + ); + this.setupParentChildRelationship(girlListPanelNode); } ); - } else { - ViewManager.I.openBundlesView("GirlListPanel", themeId); } } /** - * 进入聊天页面 - * - * @param {number} roleId - 角色ID - * - * @example - * ```typescript - * NavigationManager.Instance.navigateToChat(10001); - * ``` + * 查找已存在的GirlListPanel */ - public navigateToChat(roleId: number): void; - /** - * 进入聊天页面(带过渡动画) - * - * @param {number} roleId - 角色ID - * @param {PageTransitionConfig} transitionConfig - 过渡动画配置 - * @param {any} currentPanel - 当前面板实例(可选) - * - * @example - * ```typescript - * NavigationManager.Instance.navigateToChat(10001, - * { incomingTransition: PageTransitionType.FADE, outgoingTransition: PageTransitionType.SLIDE_LEFT }, - * this - * ); - * ``` - */ - public navigateToChat( - roleId: number, - transitionConfig?: PageTransitionConfig, - currentPanel?: any - ): void; - public navigateToChat( - roleId: number, - transitionConfig?: PageTransitionConfig, - currentPanel?: any - ): void { - if (roleId == null || roleId <= 0) { - console.warn("Invalid role ID for chat navigation:", roleId); - return; - } - GameRootUI.I.hideDefaultView(); - console.log(`Navigating to chat with role ID: ${roleId}`); + private findExistingGirlListPanel(): GirlListPanel { + if (this.girlListPanel) return this.girlListPanel; + else return null; + } - if (transitionConfig) { - this.navigateWithTransition( - "ChatPanel", - roleId, - transitionConfig, - currentPanel + /** + * 重新激活已存在的GirlListPanel + */ + private reactivateGirlListPanel(panel: GirlListPanel, themeId: number): void { + try { + // 重新激活面板 + panel.node.active = true; + + // 获取面板组件并刷新数据 + //const girlListComponent = panelNode.getComponent("GirlListPanel"); + if (panel) { + // 如果有刷新方法,调用它来更新主题数据 + panel.refresh(themeId); + console.log( + "[NavigationManager] GirlListPanel reactivated with theme:", + themeId + ); + } + + // 重新建立父子关系 + this.setupParentChildRelationship(panel); + } catch (error) { + console.error( + "[NavigationManager] Error reactivating GirlListPanel:", + error ); - } else { - ViewManager.I.openBundlesView("ChatPanel", roleId); } } /** - * 带过渡动画进入聊天页面 - * 从GirlDetailPanel平滑过渡到ChatPanel - * - * @param {string} categoryId - 类别ID - * @param {number} roleId - 角色ID - * @param {any} currentPanel - 当前面板实例(GirlDetailPanel) - * - * @example - * ```typescript - * NavigationManager.Instance.navigateToChatWithTransition("1", 10001, this); - * ``` + * 建立父子页面关系的私有方法 + * @private + * @param girlListPanelNode GirlListPanel 节点 */ - public navigateToChatWithTransition( - categoryId: string, - roleId: number, - currentPanel?: any - ): void { - if (roleId == null || roleId <= 0) { - console.warn( - "Invalid role ID for chat navigation with transition:", - roleId + private setupParentChildRelationship(girlListPanelNode: any): void { + try { + // 查找 ThemePanel 实例 + const themePanel = this.findThemePanelNode(); + if (themePanel) { + const girlListPanelComponent = + girlListPanelNode.getComponent(GirlListPanel); + + if (themePanel && girlListPanelComponent) { + console.log( + "[NavigationManager] Setting up parent-child relationship" + ); + this.themePanel.setChildPanel(girlListPanelComponent); + } else { + console.warn("[NavigationManager] Failed to get panel components"); + } + } else { + console.warn("[NavigationManager] ThemePanel not found"); + } + } catch (error) { + console.error( + "[NavigationManager] Error setting up parent-child relationship:", + error ); - return; } + } - const navigationData = { - categoryId: categoryId, - roleId: roleId, - }; + /** + * 查找 ThemePanel 节点的私有方法 + * @private + * @returns ThemePanel 节点或 null + */ + private findThemePanelNode(): ThemePanel { + if (this.themePanel) return this.themePanel; + return null; + } - const transitionConfig: PageTransitionConfig = { - incomingTransition: PageTransitionType.SLIDE_RIGHT, - outgoingTransition: PageTransitionType.SLIDE_LEFT, - duration: 0.3, - simultaneous: true, - }; - - this.navigateWithTransition( - "ChatPanel", - navigationData, - transitionConfig, - currentPanel + /** + * 处理导航时 ThemePanel 子页面的隐藏逻辑 + * @private + */ + private handleThemePanelChildPanelsOnNavigation(): void { + console.log( + "[NavigationManager] Handling ThemePanel child panels on navigation" ); - } - /** - * 进入角色详情页面 - * - * @param {number} roleId - 角色ID - * - * @example - * ```typescript - * NavigationManager.Instance.navigateToGirlDetail(10001); - * ``` - */ - public navigateToGirlDetail(roleId: number): void; - /** - * 进入角色详情页面(带过渡动画) - * - * @param {number} roleId - 角色ID - * @param {PageTransitionConfig} transitionConfig - 过渡动画配置 - * @param {any} currentPanel - 当前面板实例(可选) - * - * @example - * ```typescript - * NavigationManager.Instance.navigateToGirlDetail(10001, - * { incomingTransition: PageTransitionType.SLIDE_RIGHT, outgoingTransition: PageTransitionType.SLIDE_LEFT }, - * this - * ); - * ``` - */ - public navigateToGirlDetail( - roleId: number, - transitionConfig?: PageTransitionConfig, - currentPanel?: any - ): void; - public navigateToGirlDetail( - roleId: number, - transitionConfig?: PageTransitionConfig, - currentPanel?: any - ): void { - if (roleId == null || roleId <= 0) { - console.warn("Invalid role ID for detail navigation:", roleId); - return; + const themePanelNode = this.findThemePanelNode(); + if (themePanelNode) { + if (themePanelNode && themePanelNode.hideChildPanel) { + console.log("[NavigationManager] Closing ThemePanel child panels"); + themePanelNode.hideChildPanel(); + } } - - console.log(`Navigating to girl detail with role ID: ${roleId}`); - - if (transitionConfig) { - this.navigateWithTransition( - "GirlDetailPanel", - roleId, - transitionConfig, - currentPanel - ); - } else { - ViewManager.I.openBundlesView("GirlDetailPanel", roleId); - } - } - - /** - * 返回主界面 - * - * @example - * ```typescript - * NavigationManager.Instance.navigateToMainMenu(); - * ``` - */ - public navigateToMainMenu(): void { - console.log("Navigating to main menu"); - // TODO: 实现返回主界面的逻辑 - // ViewManager.I.openBundlesView("MainMenu"); - } - - /** - * 检查是否可以导航到指定页面 - * - * @param {string} pageName - 页面名称 - * @returns {boolean} 是否可以导航 - */ - public canNavigateTo(pageName: string): boolean { - const allowedPages = ["GirlListPanel", "ChatPanel", "GirlDetailPanel"]; - return allowedPages.indexOf(pageName) >= 0; - } - - /** - * 获取当前页面的导航历史(预留功能) - * - * @returns {string[]} 导航历史数组 - */ - public getNavigationHistory(): string[] { - // TODO: 实现导航历史记录功能 - console.log("Navigation history feature not implemented yet"); - return []; - } - - /** - * 返回上一页(预留功能) - */ - public goBack(): void { - // TODO: 实现返回上一页功能 - console.log("Go back feature not implemented yet"); - } - - /** - * 获取预设的过渡动画配置 - */ - public static getTransitionPresets() { - return { - SLIDE_LEFT_TO_RIGHT: { - incomingTransition: PageTransitionType.SLIDE_RIGHT, - outgoingTransition: PageTransitionType.SLIDE_LEFT, - duration: 0.1, - simultaneous: true, - } as PageTransitionConfig, - - SLIDE_RIGHT_TO_LEFT: { - incomingTransition: PageTransitionType.SLIDE_LEFT, - outgoingTransition: PageTransitionType.SLIDE_RIGHT, - duration: 0.1, - simultaneous: true, - } as PageTransitionConfig, - - SLIDE_OVER: { - incomingTransition: PageTransitionType.SLIDE_RIGHT, - outgoingTransition: PageTransitionType.NONE, - duration: 0.1, - simultaneous: true, - } as PageTransitionConfig, - - SLIDE_UNDER: { - incomingTransition: PageTransitionType.NONE, - outgoingTransition: PageTransitionType.SLIDE_LEFT, - duration: 0.1, - simultaneous: true, - } as PageTransitionConfig, - }; } } diff --git a/assets/Scripts/chat18x/test.meta b/assets/Scripts/chat18x/test.meta new file mode 100644 index 00000000..47fd41e3 --- /dev/null +++ b/assets/Scripts/chat18x/test.meta @@ -0,0 +1,9 @@ +{ + "ver": "1.2.0", + "importer": "directory", + "imported": true, + "uuid": "c651522c-4a0f-45c1-85ac-118560c04f90", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/assets/Scripts/chat18x/ui/panels/ChatPanel.ts b/assets/Scripts/chat18x/ui/panels/ChatPanel.ts index 55114eff..d33d97ce 100644 --- a/assets/Scripts/chat18x/ui/panels/ChatPanel.ts +++ b/assets/Scripts/chat18x/ui/panels/ChatPanel.ts @@ -30,7 +30,7 @@ import { PayToTalkSubpanel } from "./PayToTalkSubpanel"; import { DataId, DataManager } from "../../data/DataManager"; import { GirlData } from "../../data/GirlData"; import { SceneBgVideoLayer } from "../../../Sub/UI/SceneBgVideoLayer"; -import { NavigationManager } from "../../manager/NavigationManager"; +import { NavigationManager, PanelType } from "../../manager/NavigationManager"; const { ccclass, property } = _decorator; @ccclass("ChatPanel") @@ -79,22 +79,79 @@ export class ChatPanel extends li_BaseView implements IChatPanelCallback { this.girlName.string = LanguageUtils.getText(this.nameKey); }; - openUIDataCT(data) { - const newRoleId = - typeof data === "object" && data.roleId !== undefined - ? data.roleId - : data; + targetSize; + videoAreaPos; + onLoadCT() { + Utils.parseNode(this.node, this._nodeTab); + + // 获取 videoArea 的尺寸和位置 + this.targetSize = this.videoArea.contentSize; + this.videoAreaPos = new Vec3(540, 1170, 0); + + this.register(); + //this.refresh(); + this.payToTalkPanel.node.active = false; + + // 检查 SceneBgVideoLayer 是否可用 + if (!this.videoLayer) { + console.error("ChatPanel: SceneBgVideoLayer.handle 未初始化"); + } else { + console.log("ChatPanel: 成功获取 SceneBgVideoLayer 实例"); + } + } + + register() { + Utils.addInnerEL( + InnerMsgCode.LanguageChange, + this, + this.onLanguageChangeCallback + ); + + Utils.addInnerEL( + InnerMsgCode.Chat_EmotionInitialized, + this, + this.onEmotionInitialized + ); + + Utils.addInnerEL( + InnerMsgCode.ChatTotalCountChange, + this, + this.onChatCountChange + ); + } + + onDestroy(): void { + Utils.removeInnerEL( + InnerMsgCode.LanguageChange, + this, + this.onLanguageChangeCallback + ); + Utils.removeInnerEL( + InnerMsgCode.ChatTotalCountChange, + this, + this.onChatCountChange + ); + Utils.removeInnerEL( + InnerMsgCode.Chat_EmotionInitialized, + this, + this.onEmotionInitialized + ); + + // 解绑ChatController(不销毁,因为它是单例) + if (this.chatController) { + this.chatController.unbindView(); + this.chatController = null; + } + } + refresh() { + const newRoleId = NavigationManager.Instance.getSelectedGirlId(); // 检查是否是切换角色 const isRoleSwitch = this.id && this.id !== newRoleId; this.id = newRoleId; - this.categoryId = data.categoryId; - // 如果标记了需要滑入动画,则执行动画 - // 延迟一帧执行动画,确保节点已正确加载到场景中 - this.scheduleOnce(() => { - UITransitionHelper.slideInFromRight(this.node, 0.3); - }, 0); + this.categoryId = + NavigationManager.Instance.getSelectedThemeId().toString(); // 获取ChatController单例并绑定当前Panel this.chatController = ChatController.Instance; @@ -119,83 +176,7 @@ export class ChatPanel extends li_BaseView implements IChatPanelCallback { this.chatController.initialize(this.categoryId, this.id); } } - } - targetSize; - videoAreaPos; - onLoadCT() { - Utils.parseNode(this.node, this._nodeTab); - // 获取 videoArea 的尺寸和位置 - this.targetSize = this.videoArea.contentSize; - this.videoAreaPos = new Vec3(540, 1170, 0); - - this.register(); - this.refresh(); - this.payToTalkPanel.node.active = false; - - // 检查 SceneBgVideoLayer 是否可用 - if (!this.videoLayer) { - console.error("ChatPanel: SceneBgVideoLayer.handle 未初始化"); - } else { - console.log("ChatPanel: 成功获取 SceneBgVideoLayer 实例"); - } - } - - register() { - Utils.addInnerEL( - InnerMsgCode.Chat_DialogRefresh, - this, - this.onDialogUpdate - ); - - Utils.addInnerEL( - InnerMsgCode.LanguageChange, - this, - this.onLanguageChangeCallback - ); - - Utils.addInnerEL( - InnerMsgCode.Chat_EmotionInitialized, - this, - this.onEmotionInitialized - ); - - Utils.addInnerEL( - InnerMsgCode.ChatTotalCountChange, - this, - this.onChatCountChange - ); - } - - onDestroy(): void { - Utils.removeInnerEL( - InnerMsgCode.Chat_DialogRefresh, - this, - this.onDialogUpdate - ); - Utils.removeInnerEL( - InnerMsgCode.LanguageChange, - this, - this.onLanguageChangeCallback - ); - Utils.removeInnerEL( - InnerMsgCode.ChatTotalCountChange, - this, - this.onChatCountChange - ); - Utils.removeInnerEL( - InnerMsgCode.Chat_EmotionInitialized, - this, - this.onEmotionInitialized - ); - - // 解绑ChatController(不销毁,因为它是单例) - if (this.chatController) { - this.chatController.unbindView(); - this.chatController = null; - } - } - refresh() { const girlData = DataManager.I.getDataById(DataId.Girl); this.nameKey = girlData.getGrilName(this.categoryId, this.id); @@ -372,6 +353,8 @@ export class ChatPanel extends li_BaseView implements IChatPanelCallback { } protected onEnable(): void { if (!this.manager) this.manager = DialogManager.getInstance(); + + this.refresh(); } public async OnClickSend() { @@ -465,11 +448,7 @@ export class ChatPanel extends li_BaseView implements IChatPanelCallback { returnBtn() { // Navigate back to GirlDetailPanel with current girlId using smooth transition - NavigationManager.Instance.navigateToGirlDetail( - this.id, - NavigationManager.getTransitionPresets().SLIDE_RIGHT_TO_LEFT, - this - ); + NavigationManager.Instance.switchToPanel(PanelType.GIRL_DETAIL); } onClickRecord() { ViewManager.I.openBundlesView("RecordPanel", this.id); diff --git a/assets/Scripts/chat18x/ui/panels/GirlDetailPanel.ts b/assets/Scripts/chat18x/ui/panels/GirlDetailPanel.ts index b782cba1..12db56d2 100644 --- a/assets/Scripts/chat18x/ui/panels/GirlDetailPanel.ts +++ b/assets/Scripts/chat18x/ui/panels/GirlDetailPanel.ts @@ -4,7 +4,6 @@ import { Node, Sprite, VideoPlayer, - instantiate, UITransform, Size, Vec3, @@ -13,7 +12,8 @@ import { import li_BaseView from "db://assets/Scripts/Main/Common/li_BaseView"; import ResManager from "db://assets/Scripts/Main/Manager/ResManager"; import { DetailImageItem } from "../../uiitems/DetailImageItem"; -import { NavigationManager } from "../../manager/NavigationManager"; +import { NavigationManager, PanelType } from "../../manager/NavigationManager"; +import { DetailImageItemPool } from "../../manager/DetailImageItemPool"; import { ConfigManager } from "../../manager/ConfigManager"; import LanguageUtils from "../../../Main/Common/LanguageUtils"; import Utils from "../../../Main/Common/Utils"; @@ -71,36 +71,18 @@ export class GirlDetailPanel extends li_BaseView { @property(Node) imgsLayout: Node; - openUIDataCT(data) { - this.id = data; - } videoAreaPos; + + protected onEnable(): void { + this.refresh(); + } + onLoadCT() { super.onLoadCT(); - this.imgItemInst.node.active = false; - this.videoAreaPos = new Vec3(540, 1384); - const pos = new Vec3( - this.descContent.position.x, - this.descContent.position.y, - this.descContent.position.z - ); - this.descContent.position = new Vec3(pos.x, pos.y - 1000, pos.z); - //this.node.scale = Vec3.ZERO; - tween(this.descContent) - .to(0.3, { position: pos }, { easing: "quadOut" }) - .start(); + //this.refresh(); - // 检查 SceneBgVideoLayer 是否可用 - if (!this.videoLayer) { - console.error("GirlDetailPanel: SceneBgVideoLayer.handle 未初始化"); - } else { - console.log("GirlDetailPanel: 成功获取 SceneBgVideoLayer 实例"); - // 初始化视频显示位置 - //this.initVideoPosition(); - } - - this.refresh(this.id); + DetailImageItemPool.Instance.setTemplate(this.imgItemInst.node); Utils.addInnerEL(InnerMsgCode.LanguageChange, this, () => { this.girlName.string = LanguageUtils.getText(this.nameKey); @@ -153,7 +135,32 @@ export class GirlDetailPanel extends li_BaseView { tagKey: string; descKey: string; category: number; - async refresh(index: number) { + async refresh() { + this.id = NavigationManager.Instance.getSelectedGirlId(); + + this.imgItemInst.node.active = false; + this.videoAreaPos = new Vec3(540, 1384); + + const pos = new Vec3( + this.descContent.position.x, + this.descContent.position.y, + this.descContent.position.z + ); + this.descContent.position = new Vec3(pos.x, pos.y - 1000, pos.z); + //this.node.scale = Vec3.ZERO; + tween(this.descContent) + .to(0.3, { position: pos }, { easing: "quadOut" }) + .start(); + + // 检查 SceneBgVideoLayer 是否可用 + if (!this.videoLayer) { + console.error("GirlDetailPanel: SceneBgVideoLayer.handle 未初始化"); + } else { + console.log("GirlDetailPanel: 成功获取 SceneBgVideoLayer 实例"); + // 初始化视频显示位置 + //this.initVideoPosition(); + } + const girlData = DataManager.I.getDataById(DataId.Girl); this.category = girlData.getGrilCategoryById(this.id); // 请求详细数据 @@ -274,49 +281,29 @@ export class GirlDetailPanel extends li_BaseView { resIds: number[] ) { for (let i = this.imgsLayout.children.length - 1; i >= 0; i--) { - this.imgsLayout.children[i].destroy(); + DetailImageItemPool.Instance.put(this.imgsLayout.children[i]); } let count = resIds.length; for (let i = 0; i < count; i++) { - let newNode = instantiate(this.imgItemInst.node); - let item = newNode.getComponent(DetailImageItem); - let resId = resIds[i]; - item.refresh(this, type, category, id, resId); - newNode.active = true; - this.imgsLayout.addChild(newNode); + let newNode = DetailImageItemPool.Instance.get(); + if (newNode) { + let item = newNode.getComponent(DetailImageItem); + let resId = resIds[i]; + item.refresh(this, type, category, id, resId); + newNode.active = true; + this.imgsLayout.addChild(newNode); + } } } - /** - * 初始化视频位置和属性 - */ - private initVideoPosition() { - if (!this.videoLayer || !this.videoArea) return; - - // 使用 videoArea 的世界坐标位置 - const videoAreaWorldPos = this.videoArea.node.getWorldPosition(); - // 视频位置和缩放已在 playVideo 中处理 - //this.videoLayer.setVideoScale(1); - console.log( - `GirlDetailPanel: 初始化视频世界位置到 (${videoAreaWorldPos.x}, ${videoAreaWorldPos.y})` - ); - } - OnClickChatBtn() { // 使用带过渡动画的导航方法 - NavigationManager.Instance.navigateToChatWithTransition( - this.category.toString(), - this.id, - this - ); - // 注意:不在这里直接调用onClose,而是在动画完成后由NavigationManager调用 + NavigationManager.Instance.switchToPanel(PanelType.CHAT); } returnBtn() { - this.onClose(); - NavigationManager.Instance.navigateToGirlList(this.category); - //ViewManager.I.openBundlesView("GirlListPanel"); + NavigationManager.Instance.switchToPanel(PanelType.THEME); } /** @@ -342,6 +329,11 @@ export class GirlDetailPanel extends li_BaseView { //console.log("GirlDetailPanel: 销毁时停止视频播放"); } + // 回收所有使用中的节点到对象池 + for (let i = this.imgsLayout.children.length - 1; i >= 0; i--) { + DetailImageItemPool.Instance.put(this.imgsLayout.children[i]); + } + super.onDestroy(); } } diff --git a/assets/Scripts/chat18x/ui/panels/GirlListPanel.ts b/assets/Scripts/chat18x/ui/panels/GirlListPanel.ts index 827c6cbb..c38ab6bf 100644 --- a/assets/Scripts/chat18x/ui/panels/GirlListPanel.ts +++ b/assets/Scripts/chat18x/ui/panels/GirlListPanel.ts @@ -10,6 +10,7 @@ import { GirlData } from "../../data/GirlData"; import proto from "db://assets/Scripts/proto/proto.pb.js"; import GameRootUI from "../../../Main/Common/GameRootUI"; import { UITransitionHelper } from "../../utils/UITransitionHelper"; +import { NavigationManager, PanelType } from "../../manager/NavigationManager"; const { ccclass, property } = _decorator; @@ -22,15 +23,24 @@ export class GirlListPanel extends li_BaseView { cache: GirlListItem[] = []; - category: number; - openUIDataCT(data) { - // 支持新的数据格式:既可以是单纯的数字,也可以是包含过渡动画信息的对象 - this.category = - typeof data === "object" && data.category !== undefined - ? data.category - : data; + // 缓存池相关属性 + private itemPool: GirlListItem[] = []; + private maxPoolSize: number = 20; - const withAnimation = typeof data === "object" && data.withTransition; + category: number; + private parentPanelName: string = null; + + openUIDataCT(data) { + console.log("[GirlListPanel] openUIDataCT called with data:", data); + + // 支持新的数据格式:既可以是单纯的数字,也可以是包含主题ID和父页面信息的对象 + if (typeof data === "object") { + this.category = data.themeId; + this.parentPanelName = data.parentPanel; + console.log("[GirlListPanel] Set parent panel:", this.parentPanelName); + } else { + this.category = data; + } } onLoadCT() { Utils.parseNode(this.node, this._nodeTab); @@ -41,11 +51,54 @@ export class GirlListPanel extends li_BaseView { this.refresh(this.category); } + cacheCategory: number = -1; + + // 从缓存池获取节点 + private getItemFromPool(): GirlListItem { + if (this.itemPool.length > 0) { + return this.itemPool.pop(); + } else { + // 缓存池为空,检查是否有隐藏的节点可以复用 + for (let i = 0; i < this.content.children.length; i++) { + let childNode = this.content.children[i]; + if (!childNode.active && childNode !== this.itemInst.node) { + let item = childNode.getComponent(GirlListItem); + if (item) { + return item; + } + } + } + + // 没有可复用的节点,创建新节点 + let newNode = instantiate(this.itemInst.node); + let item = newNode.getComponent(GirlListItem); + this.content.addChild(newNode); + return item; + } + } + + // 将节点回收到缓存池 + private returnItemToPool(item: GirlListItem) { + if (this.itemPool.length < this.maxPoolSize) { + item.reset(); + this.itemPool.push(item); + } else { + // 缓存池已满,隐藏节点但不销毁 + item.reset(); + } + } + async refresh(category: number) { + if (category == this.cacheCategory) return; + this.cacheCategory = category; + + // 回收当前显示的节点到缓存池 if (this.cache) { for (let i = this.cache.length - 1; i >= 0; i--) { - this.cache[i].node.destroy(); + let item = this.cache[i]; + this.returnItemToPool(item); } + this.cache = []; } // 请求列表 @@ -62,51 +115,57 @@ export class GirlListPanel extends li_BaseView { // 根据数据,刷新界面 const allId = girlData.getGirlIds(category.toString()); for (let id of allId) { - let newNode = instantiate(this.itemInst.node); - let item = newNode.getComponent(GirlListItem); + let item = this.getItemFromPool(); item.refreshData(category, id, this.node); - newNode.active = true; + item.node.active = true; this.cache.push(item); - this.content.addChild(newNode); + + // 确保节点在 content 中(可能已经在了) + if (item.node.parent !== this.content) { + this.content.addChild(item.node); + } } } } + hide() { + this.node.active = false; + } + private registerListener() { GButton.BandClick(this._nodeTab.ReturnBtn, this.Return, this); } Return() { - console.log("GirlListPanel: Return button clicked"); + // 直接关闭,不需要动画 + this.node.active = false; + } - // 执行同步的过渡动画:GirlListPanel向右滑出,ThemePanel从左滑入 - const duration = 0.1; - let animationsCompleted = 0; - const totalAnimations = 2; - - const onAnimationComplete = (source: string) => { - console.log(`GirlListPanel: Animation completed from ${source}`); - animationsCompleted++; - console.log( - `GirlListPanel: ${animationsCompleted}/${totalAnimations} animations completed` - ); - - if (animationsCompleted >= totalAnimations) { - console.log("GirlListPanel: All animations completed, closing panel"); - // 所有动画完成后关闭当前面板 - this.onClose(); + onDestroy() { + // 清理缓存池,销毁所有缓存的节点 + for (let item of this.itemPool) { + if (item && item.node) { + item.node.destroy(); } - }; + } + this.itemPool = []; - // 1. GirlListPanel向右滑出 - console.log("GirlListPanel: Starting slideOutToRight animation"); - UITransitionHelper.slideOutToRight(this.node, duration, () => - onAnimationComplete("slideOutToRight") - ); - - // 2. ThemePanel从左侧滑入 - console.log("GirlListPanel: Starting ThemePanel slide_left animation"); - GameRootUI.I.showDefaultViewWithTransition("slide_left", duration, () => - onAnimationComplete("ThemePanel_slide_left") - ); + // 清理当前显示的节点 + for (let item of this.cache) { + if (item && item.node) { + item.node.destroy(); + } + } + this.cache = []; + + // 清理 content 中所有的 GirlListItem 节点 + for (let i = this.content.children.length - 1; i >= 0; i--) { + let child = this.content.children[i]; + if (child !== this.itemInst.node) { + let item = child.getComponent(GirlListItem); + if (item) { + child.destroy(); + } + } + } } } diff --git a/assets/Scripts/chat18x/ui/panels/NavigationPanel.ts b/assets/Scripts/chat18x/ui/panels/NavigationPanel.ts new file mode 100644 index 00000000..c99c0803 --- /dev/null +++ b/assets/Scripts/chat18x/ui/panels/NavigationPanel.ts @@ -0,0 +1,125 @@ +import { _decorator, Component, Label, Node } from "cc"; +import li_BaseView from "db://assets/Scripts/Main/Common/li_BaseView"; +import Utils from "db://assets/Scripts/Main/Common/Utils"; +import { GButton } from "db://assets/Scripts/Main/Common/GButton"; +import { + NavigationManager, + PanelType, +} from "../../manager/NavigationManager"; + + +const { ccclass, property } = _decorator; + +@ccclass("NavigationPanel") +export class NavigationPanel extends li_BaseView { + private _nodeTab: any = {}; + private currentActivePanel: PanelType = PanelType.THEME; + + private themeBtn: Node; + private girlDetailBtn: Node; + private chatBtn: Node; + private settingBtn: Node; + + private loadingView: Node; + + onLoadCT() { + Utils.parseNode(this.node, this._nodeTab); + + this.themeBtn = this._nodeTab.themeBtn; + this.girlDetailBtn = this._nodeTab.girlDetailBtn; + this.chatBtn = this._nodeTab.chatBtn; + this.settingBtn = this._nodeTab.settingBtn; + this.loadingView = this._nodeTab.loadingView; + + this.hideLoading(); + + // 注册到NavigationManager + NavigationManager.Instance.registerNavigationPanel(this); + + this.registerListener(); + this.updateButtonStates(PanelType.THEME); + + // 初次打开时通过NavigationManager切换到主题面板 + this.initializeFirstPanel(); + } + + private registerListener() { + // 所有按钮点击都通过NavigationManager处理 + GButton.BandClick( + this.themeBtn, + () => NavigationManager.Instance.switchToPanel(PanelType.THEME), + this + ); + GButton.BandClick( + this.girlDetailBtn, + () => NavigationManager.Instance.switchToPanel(PanelType.GIRL_DETAIL), + this + ); + GButton.BandClick( + this.chatBtn, + () => NavigationManager.Instance.switchToPanel(PanelType.CHAT), + this + ); + GButton.BandClick( + this.settingBtn, + () => NavigationManager.Instance.switchToPanel(PanelType.SETTING), + this + ); + } + + /** + * 更新按钮状态(公开方法,供NavigationManager调用) + * @param activePanel 当前激活的面板类型 + */ + public updateButtonStates(activePanel: PanelType) { + this.currentActivePanel = activePanel; + this._nodeTab.CurrentPanel.getComponent(Label).string = + this.currentActivePanel; + this.refreshButtonVisuals(); + } + + /** + * 刷新按钮的视觉状态 + */ + private refreshButtonVisuals() { + // TODO: 实现按钮状态更新的视觉效果 + // 根据 currentActivePanel 更新按钮的选中状态 + console.log( + "[NavigationPanel] Button states updated for:", + this.currentActivePanel + ); + } + + private initializeFirstPanel() { + // 初次打开时通过NavigationManager切换到主题面板 + NavigationManager.Instance.switchToPanel(PanelType.THEME, true); + } + + public showPanel() { + this.node.active = true; + } + + public hidePanel() { + this.node.active = false; + } + + /** + * 显示加载状态(公开方法,供NavigationManager调用) + */ + public showLoading() { + if (this.loadingView) { + this.loadingView.active = true; + } + } + + /** + * 隐藏加载状态(公开方法,供NavigationManager调用) + */ + public hideLoading() { + if (this.loadingView) { + this.loadingView.active = false; + } + } + + onDestroy(): void {} +} diff --git a/assets/Scripts/chat18x/ui/panels/NavigationPanel.ts.meta b/assets/Scripts/chat18x/ui/panels/NavigationPanel.ts.meta new file mode 100644 index 00000000..fbee5103 --- /dev/null +++ b/assets/Scripts/chat18x/ui/panels/NavigationPanel.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.24", + "importer": "typescript", + "imported": true, + "uuid": "58d92549-54a9-4f98-94af-5c0c3ac2f853", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/assets/Scripts/chat18x/ui/panels/PurchasePanel.ts b/assets/Scripts/chat18x/ui/panels/PurchasePanel.ts index 93de86a9..2d6ee0e2 100644 --- a/assets/Scripts/chat18x/ui/panels/PurchasePanel.ts +++ b/assets/Scripts/chat18x/ui/panels/PurchasePanel.ts @@ -78,7 +78,7 @@ export class PurchasePanel extends li_BaseView { this._nodeTab.ReturnBtn, () => { this.onClose(); - GameRootUI.I.showDefaultView(); + // NavigationPanel 始终显示,不需要显示 DefaultView }, this ); diff --git a/assets/Scripts/chat18x/ui/panels/RecordPanel.ts b/assets/Scripts/chat18x/ui/panels/RecordPanel.ts index a121f7f4..b85b4f2e 100644 --- a/assets/Scripts/chat18x/ui/panels/RecordPanel.ts +++ b/assets/Scripts/chat18x/ui/panels/RecordPanel.ts @@ -286,7 +286,7 @@ export class RecordPanel extends li_BaseView { } protected onEnable(): void { - GameRootUI.I.hideDefaultView(); + // NavigationPanel 始终显示,不需要隐藏 DefaultView } /** diff --git a/assets/Scripts/chat18x/ui/panels/ThemePanel.ts b/assets/Scripts/chat18x/ui/panels/ThemePanel.ts index bc987175..62a113ef 100644 --- a/assets/Scripts/chat18x/ui/panels/ThemePanel.ts +++ b/assets/Scripts/chat18x/ui/panels/ThemePanel.ts @@ -12,7 +12,11 @@ import Utils from "db://assets/Scripts/Main/Common/Utils"; import { GButton } from "db://assets/Scripts/Main/Common/GButton"; import ResManager from "db://assets/Scripts/Main/Manager/ResManager"; import { ThemeItem } from "../../uiitems/ThemeItem"; -import { NavigationManager, PageTransitionType } from "../../manager/NavigationManager"; +import { + NavigationManager, + PageTransitionType, + PanelType, +} from "../../manager/NavigationManager"; import { GirlListItem } from "../../uiitems/GirlListItem"; import LanguageUtils from "../../../Main/Common/LanguageUtils"; import { ViewManager } from "../../../Main/Manager/ViewManager"; @@ -28,6 +32,8 @@ import { AccountData } from "../../data/AccountData"; import { ShopData } from "../../data/ShopData"; import proto from "db://assets/Scripts/proto/proto.pb.js"; import GameRootUI from "../../../Main/Common/GameRootUI"; +import { MainController } from "../../core/MainController"; +import { GirlListPanel } from "./GirlListPanel"; const { ccclass, property } = _decorator; @@ -37,7 +43,7 @@ export class ThemePanel extends li_BaseView { coinNum: Label; uid: Label; - itemInst: GirlListItem; + itemInst: ThemeItem; content: Node; private vipLeftTime: Label; recId: number; @@ -46,6 +52,14 @@ export class ThemePanel extends li_BaseView { cache: ThemeItem[] = []; + // 子页面管理 + private listPanel: GirlListPanel = null; + + // 加载状态保护 + private isLoading: boolean = false; + private loadingPromise: Promise | null = null; + private abortController: AbortController | null = null; + onLoadCT() { Utils.parseNode(this.node, this._nodeTab); @@ -64,67 +78,206 @@ export class ThemePanel extends li_BaseView { } rectNameKey: string; - async Show() { - this._nodeTab.loadingRec.active = true; - //some temp data - this.refreshCoinNum(); - this.refreshVipExpire(); - const accountData = DataManager.I.getDataById(DataId.Account); - this.uid.string = "uid: " + accountData.accId; - this.recId = 1; - if (this.cache) { - for (let i = this.cache.length - 1; i >= 0; i--) { - this.cache[i].node.destroy(); + async Show(forceRefresh: boolean = false) { + // 防止重复加载 + if (this.isLoading) { + console.log("[ThemePanel] 已在加载中,等待当前加载完成"); + if (this.loadingPromise) { + await this.loadingPromise; + } + return; + } + + this.isLoading = true; + this.loadingPromise = this._showInternal(forceRefresh); + + try { + await this.loadingPromise; + } finally { + this.isLoading = false; + this.loadingPromise = null; + } + } + + private async _showInternal(forceRefresh: boolean = false) { + // 创建新的AbortController用于取消操作 + this.abortController = new AbortController(); + const signal = this.abortController.signal; + + try { + this._nodeTab.loadingRec.active = true; + //some temp data + this.refreshCoinNum(); + this.refreshVipExpire(); + const accountData = DataManager.I.getDataById( + DataId.Account + ); + this.uid.string = "uid: " + accountData.accId; + this.recId = 1; + + // 检查是否已被取消 + if (signal.aborted) { + throw new Error("Operation was aborted"); + } + + // 清理旧的cache节点(每次都清理,解决内存泄漏问题) + this.clearCache(); + + // 如果需要强制刷新,先刷新数据 + if (forceRefresh) { + console.log("[ThemePanel] 开始强制刷新数据"); + await Promise.all([ + MainController.I.refreshThemeData(), + MainController.I.refreshDailyRecommend(), + ]); + console.log("[ThemePanel] 数据刷新完成"); + + // 再次检查是否已被取消 + if (signal.aborted) { + throw new Error("Operation was aborted"); + } + } + + // 优先使用MainController中预加载的数据 + const preloadStatus = MainController.I.getPreloadStatus(); + console.log("[ThemePanel] 预加载状态:", preloadStatus); + + // 处理主题数据 + await this.handleThemeData(preloadStatus.themeData); + + // 检查是否已被取消 + if (signal.aborted) { + throw new Error("Operation was aborted"); + } + + // 处理每日推荐数据 + await this.handleDailyRecommendData(preloadStatus.dailyRecommend); + + // 检查是否已被取消 + if (signal.aborted) { + throw new Error("Operation was aborted"); + } + + this._nodeTab.loadingRec.active = false; + + // 处理商品列表数据 + await this.handleShopListData(preloadStatus.shopList); + } catch (error) { + console.error("[ThemePanel] Show操作出错:", error); + this._nodeTab.loadingRec.active = false; + + // 如果不是取消操作导致的错误,可以考虑显示错误提示 + if (error.message !== "Operation was aborted") { + // 这里可以添加错误提示逻辑 + console.error("[ThemePanel] 数据加载失败,请稍后重试"); + } + } finally { + this.abortController = null; + } + } + + /** + * 处理主题数据 + */ + private async handleThemeData(isPreloaded: boolean): Promise { + if (isPreloaded) { + console.log("[ThemePanel] 使用预加载的主题数据"); + // 直接使用预加载的数据渲染界面 + const themeData = DataManager.I.getDataById(DataId.Theme); + if (themeData && themeData.themes) { + this.renderThemeData(themeData); + return; } } - // 请求主题数据 + + // 如果没有预加载数据,则请求数据 + console.log("[ThemePanel] 请求主题数据"); const reqData = {}; let res = await ThemeService.I.reqHallTheme(reqData); if (res && res.code === proto.cs.EnmRetCode.SUCCESS) { // 保存数据 const themeData = DataManager.I.getDataById(DataId.Theme); themeData.themes = res.data; - // 根据数据,刷新界面 - const themeIds = themeData.themeIds; - for (let id of themeIds) { - let newNode = instantiate(this.itemInst.node); - let item = newNode.getComponent(ThemeItem); - item.refresh(id, this); - newNode.active = true; - this.cache.push(item); - this.content.addChild(newNode); + this.renderThemeData(themeData); + } + } + + /** + * 渲染主题数据 + */ + private renderThemeData(themeData: ThemeData): void { + const themeIds = themeData.themeIds; + for (let id of themeIds) { + let newNode = instantiate(this.itemInst.node); + let item = newNode.getComponent(ThemeItem); + item.refresh(id, this); + newNode.active = true; + this.cache.push(item); + this.content.addChild(newNode); + } + } + + /** + * 处理每日推荐数据 + */ + private async handleDailyRecommendData(isPreloaded: boolean): Promise { + if (isPreloaded) { + console.log("[ThemePanel] 使用预加载的每日推荐数据"); + // 直接使用预加载的数据渲染界面 + const girlData = DataManager.I.getDataById(DataId.Girl); + if (girlData) { + this.renderDailyRecommendData(girlData); + return; } } - // 请求每日推荐 - const reqData2 = {}; - let res2 = await GirlService.I.reqDailyRecommend(reqData2); - if (res2 && res2.code === proto.cs.EnmRetCode.SUCCESS) { + // 如果没有预加载数据,则请求数据 + console.log("[ThemePanel] 请求每日推荐数据"); + const reqData = {}; + let res = await GirlService.I.reqDailyRecommend(reqData); + if (res && res.code === proto.cs.EnmRetCode.SUCCESS) { const girlData = DataManager.I.getDataById(DataId.Girl); - girlData.setDailyRecommend(res2.data); - // 根据数据,刷新界面 - this.recId = girlData.getRecommendGirlId(); - this.rectNameKey = girlData.getRecommendGrilName(); - let avatarPath = girlData.getRecommendGrilAvatar(); - this.recName.string = LanguageUtils.getText(this.rectNameKey); - ResManager.I.changeBundleSpriteFrame( - this.recSprite, - avatarPath, - "Girls", - () => { - let sizeTran = this.recSprite.node.parent.getComponent(UITransform); - Utils.adjustBgPixelRatioToSize( - sizeTran.contentSize, - this.recSprite.node, - 1 - ); - } - ); + girlData.setDailyRecommend(res.data); + this.renderDailyRecommendData(girlData); } - this._nodeTab.loadingRec.active = false; + } - // 获取商品列表,提前把数据拿下来 - this.reqShopList(); + /** + * 渲染每日推荐数据 + */ + private renderDailyRecommendData(girlData: GirlData): void { + this.recId = girlData.getRecommendGirlId(); + this.rectNameKey = girlData.getRecommendGrilName(); + let avatarPath = girlData.getRecommendGrilAvatar(); + this.recName.string = LanguageUtils.getText(this.rectNameKey); + ResManager.I.changeBundleSpriteFrame( + this.recSprite, + avatarPath, + "Girls", + () => { + let sizeTran = this.recSprite.node.parent.getComponent(UITransform); + Utils.adjustBgPixelRatioToSize( + sizeTran.contentSize, + this.recSprite.node, + 1 + ); + } + ); + } + + /** + * 处理商品列表数据 + */ + private async handleShopListData(isPreloaded: boolean): Promise { + if (isPreloaded) { + console.log("[ThemePanel] 商品列表数据已预加载"); + // 数据已经在DataManager中,不需要额外处理 + return; + } + + // 如果没有预加载数据,则请求数据 + console.log("[ThemePanel] 请求商品列表数据"); + await this.reqShopList(); } private registerListener() { @@ -135,15 +288,13 @@ export class ThemePanel extends li_BaseView { GButton.BandClick(this._nodeTab.ShopPanelEntry, this.enterShop, this); - Utils.addInnerEL(InnerMsgCode.LanguageChange, this, () => { - this.recName.string = LanguageUtils.getText(this.rectNameKey); - }); - Utils.addInnerEL(InnerMsgCode.BalanceChange, this, () => { - this.refreshCoinNum(); - }); - Utils.addInnerEL(InnerMsgCode.VipExpireChange, this, () => { - this.refreshVipExpire(); - }); + Utils.addInnerEL(InnerMsgCode.LanguageChange, this, this.onLanguageChange); + Utils.addInnerEL(InnerMsgCode.BalanceChange, this, this.onBalanceChange); + Utils.addInnerEL( + InnerMsgCode.VipExpireChange, + this, + this.onVipExpireChange + ); } enterShop() { @@ -164,9 +315,11 @@ export class ThemePanel extends li_BaseView { this.recId ) == 0; if (isRelease || isFree) { - const transitionConfig = NavigationManager.getTransitionPresets().SLIDE_LEFT_TO_RIGHT; - NavigationManager.Instance.navigateToGirlDetail(this.recId, transitionConfig, this); - GameRootUI.I.hideDefaultView(); + NavigationManager.Instance.setSelectedGirlId(this.recId); + NavigationManager.Instance.setSelectedCategoryId( + girlData.getGrilCategoryById(this.recId) + ); + NavigationManager.Instance.switchToPanel(PanelType.GIRL_DETAIL); } else { //未解锁 ViewManager.I.openBundlesPopupView("GirlListPopupPanel", { @@ -178,7 +331,8 @@ export class ThemePanel extends li_BaseView { } openSetting() { - ViewManager.I.openBundlesView("SettingPanel"); + // 通过NavigationManager切换到设置面板,保持动画和状态同步 + NavigationManager.Instance.switchToPanel(PanelType.SETTING); } openMsgBox() { @@ -215,11 +369,112 @@ export class ThemePanel extends li_BaseView { } } - onDestroy(): void { - Utils.removeInnerEL(InnerMsgCode.LanguageChange, this, () => { - this.recName.string = LanguageUtils.getText(this.rectNameKey); - }); - Utils.removeInnerEL(InnerMsgCode.BalanceChange, this, () => {}); - Utils.removeInnerEL(InnerMsgCode.VipExpireChange, this, () => {}); + /** + * 清理缓存节点 + */ + private clearCache(): void { + if (this.cache && this.cache.length > 0) { + console.log(`[ThemePanel] 清理 ${this.cache.length} 个缓存节点`); + for (let i = this.cache.length - 1; i >= 0; i--) { + if (this.cache[i] && this.cache[i].node && this.cache[i].node.isValid) { + this.cache[i].node.destroy(); + } + } + this.cache = []; + } } + + public getChildPanel(): GirlListPanel { + if (this.listPanel) return this.listPanel; + return null; + } + public setChildPanel(panel: GirlListPanel) { + this.listPanel = panel; + } + /** + * 隐藏子页面 + */ + public hideChildPanel(): void { + if (this.listPanel) { + console.log("[ThemePanel] Closing child panel"); + if (this.listPanel.hide) { + this.listPanel.hide(); + } + } + } + /** + * 关闭子页面 + */ + public clostChildPanel(): void { + if (this.listPanel) { + console.log("[ThemePanel] Closing child panel"); + if (this.listPanel.close) { + this.listPanel.close(); + } + this.listPanel = null; + } + } + + /** + * 页面被隐藏时调用 + */ + public onHide(): void { + console.log("[ThemePanel] onHide called"); + this.hideChildPanel(); + this.cancelCurrentOperation(); + } + + /** + * 取消当前操作 + */ + private cancelCurrentOperation(): void { + if (this.abortController) { + console.log("[ThemePanel] 取消当前操作"); + this.abortController.abort(); + this.abortController = null; + } + } + + onDestroy(): void { + console.log("[ThemePanel] onDestroy called"); + + // 取消当前操作 + this.cancelCurrentOperation(); + + // 关闭子页面 + this.clostChildPanel(); + + // 清理缓存 + this.clearCache(); + + // 重置加载状态 + this.isLoading = false; + this.loadingPromise = null; + + // 移除事件监听器(修复回调函数引用问题) + Utils.removeInnerEL( + InnerMsgCode.LanguageChange, + this, + this.onLanguageChange + ); + Utils.removeInnerEL(InnerMsgCode.BalanceChange, this, this.onBalanceChange); + Utils.removeInnerEL( + InnerMsgCode.VipExpireChange, + this, + this.onVipExpireChange + ); + } + + // 事件回调函数(避免匿名函数导致的内存泄漏) + private onLanguageChange = () => { + this.recName.string = LanguageUtils.getText(this.rectNameKey); + }; + + private onBalanceChange = () => { + this.refreshCoinNum(); + }; + + private onVipExpireChange = () => { + this.refreshVipExpire(); + }; } diff --git a/assets/Scripts/chat18x/uiitems/DetailImageItem.ts b/assets/Scripts/chat18x/uiitems/DetailImageItem.ts index 62409bd4..6bb71660 100644 --- a/assets/Scripts/chat18x/uiitems/DetailImageItem.ts +++ b/assets/Scripts/chat18x/uiitems/DetailImageItem.ts @@ -48,11 +48,9 @@ export class DetailImageItem extends Component { resId: number; type: proto.cs.EnmResType; - test_resID: Node; onLoad() { GButton.BandClick(this.node, this.onClickThis, this); this.uitransform = this.node.getComponent(UITransform); - this.test_resID.active = false; } isVisible: boolean; onClickThis() { @@ -146,10 +144,6 @@ export class DetailImageItem extends Component { //this.question.active = true; // 显示问号,表示加载中 this.loading.active = true; - this.test_resID = this.node.getChildByName("resID"); - - this.test_resID.getComponent(Label).string = - this.girlId.toString() + this.resId; const girlData = DataManager.I.getDataById(DataId.Girl); let imgPath = ""; @@ -228,4 +222,25 @@ export class DetailImageItem extends Component { }); } } + + reset() { + this.base = null; + this.url = ""; + this.isImage = false; + this.category = 0; + this.girlId = 0; + this.resId = 0; + this.type = null; + this.isVisible = false; + + this.question.active = true; + this.video.enabled = false; + this.priceFrame.active = false; + this.loading.active = false; + this.videoPrice.string = ""; + + if (this.img && this.img.spriteFrame) { + this.img.spriteFrame = null; + } + } } diff --git a/assets/Scripts/chat18x/uiitems/GirlListItem.ts b/assets/Scripts/chat18x/uiitems/GirlListItem.ts index bb2ce371..f992a75c 100644 --- a/assets/Scripts/chat18x/uiitems/GirlListItem.ts +++ b/assets/Scripts/chat18x/uiitems/GirlListItem.ts @@ -12,7 +12,7 @@ import { Config18x } from "db://assets/Scripts/Main/Config/Config18x"; import { ViewManager } from "db://assets/Scripts/Main/Manager/ViewManager"; import ResManager from "db://assets/Scripts/Main/Manager/ResManager"; import Utils from "db://assets/Scripts/Main/Common/Utils"; -import { NavigationManager } from "../manager/NavigationManager"; +import { NavigationManager, PanelType } from "../manager/NavigationManager"; import { PriceType } from "../../schema/schema"; import LanguageUtils from "../../Main/Common/LanguageUtils"; import { InnerMsgCode } from "../../Main/Config/InnerMsgCode"; @@ -134,10 +134,7 @@ export class GirlListItem extends Component { // this.price.node.active = priceType == PriceType.pay; // this.freeNode.active = priceType == PriceType.free; //this.tryNode.active = priceType == PriceType.first_time_free; - let avatarPath = girlData.getGrilAvatar( - this.category.toString(), - this.id - ); + let avatarPath = girlData.getGrilAvatar(this.category.toString(), this.id); this.loading.active = true; //listAvatarPath = listAvatarPath.replace("Avatar", "avatar"); //临时 @@ -177,13 +174,52 @@ export class GirlListItem extends Component { } } + reset() { + this.id = -1; + this.category = 0; + this.nameKey = ""; + this.tagKey = ""; + this.baseNode = null; + + // 重置UI状态 + this.node.active = false; + this.loading.active = false; + + // 清理文本内容 + if (this.girlName) this.girlName.string = ""; + if (this.tags) this.tags.string = ""; + if (this.price) this.price.string = ""; + + // 重置可见性状态 + if (this.price?.node) this.price.node.active = false; + if (this.freeNode) this.freeNode.active = false; + if (this.starParent) this.starParent.active = false; + if (this.chatIcon) this.chatIcon.active = false; + if (this.unreleaseCover) this.unreleaseCover.active = false; + + // 清理头像 + if (this.avatar) { + this.avatar.spriteFrame = null; + } + + // 清理星级显示 + if (this.stars) { + for (let star of this.stars) { + star.spriteFrame = null; + } + } + } + onClickDetail() { const girlData = DataManager.I.getDataById(DataId.Girl); // 是否已经解锁 const isRelease = girlData.getIsRelease(this.category.toString(), this.id); if (isRelease) { - NavigationManager.Instance.navigateToGirlDetail(this.id); - ViewManager.I.closeView(this.baseNode); + // 先设置选中的角色ID + NavigationManager.Instance.setSelectedGirlId(this.id); + + // 通过switchToPanel切换到角色详情面板,保持动画和状态同步 + NavigationManager.Instance.switchToPanel(PanelType.GIRL_DETAIL); } else { //未解锁 ViewManager.I.openBundlesPopupView("GirlListPopupPanel", { diff --git a/assets/Scripts/chat18x/uiitems/ThemeItem.ts b/assets/Scripts/chat18x/uiitems/ThemeItem.ts index cf7bc5ab..323f7a81 100644 --- a/assets/Scripts/chat18x/uiitems/ThemeItem.ts +++ b/assets/Scripts/chat18x/uiitems/ThemeItem.ts @@ -74,8 +74,8 @@ export class ThemeItem extends Component { return; } - // 使用预设的过渡动画配置 - const transitionConfig = NavigationManager.getTransitionPresets().SLIDE_LEFT_TO_RIGHT; - NavigationManager.Instance.navigateToGirlList(this.category, transitionConfig, this.parentPanel); + console.log("[ThemeItem] Opening GirlListPanel for category:", this.category); + // 不使用过渡动画,直接打开 + NavigationManager.Instance.navigateToGirlList(this.category); } } diff --git a/assets/Scripts/chat18x/utils/UITransitionHelper.ts b/assets/Scripts/chat18x/utils/UITransitionHelper.ts index 206672e7..a3cc540b 100644 --- a/assets/Scripts/chat18x/utils/UITransitionHelper.ts +++ b/assets/Scripts/chat18x/utils/UITransitionHelper.ts @@ -13,7 +13,7 @@ const { ccclass, property } = _decorator; @ccclass("UITransitionHelper") export class UITransitionHelper { /** - * 让节点从右侧滑入到原位置 + * 让节点从右侧滑入到屏幕中心 * * @param {Node} node - 要执行动画的节点 * @param {number} duration - 动画持续时间(秒),默认0.3秒 @@ -21,7 +21,7 @@ export class UITransitionHelper { */ public static slideInFromRight( node: Node, - duration: number = 0.1, + duration: number = 0.3, callback?: Function ): void { if (!node || !node.isValid) { @@ -30,18 +30,18 @@ export class UITransitionHelper { } const screenWidth = view.getVisibleSize().width; - const originalPosition = node.getPosition(); + const targetPosition = new Vec3(0, 0, 0); // 设置初始位置为屏幕右侧外 - node.setPosition(screenWidth, originalPosition.y, originalPosition.z); + node.setPosition(screenWidth, 0, 0); - // 执行滑入动画 + // 执行滑入动画到屏幕中心 tween(node) .to( duration, - { position: originalPosition }, + { position: targetPosition }, { - easing: "linear", + easing: "cubicOut", } ) .call(() => { @@ -61,7 +61,7 @@ export class UITransitionHelper { */ public static slideOutToLeft( node: Node, - duration: number = 0.1, + duration: number = 0.3, callback?: Function ): void { if (!node || !node.isValid) { @@ -83,7 +83,7 @@ export class UITransitionHelper { duration, { position: targetPosition }, { - easing: "linear", + easing: "cubicOut", } ) .call(() => { @@ -95,7 +95,7 @@ export class UITransitionHelper { } /** - * 让节点从左侧滑入到原位置 + * 让节点从左侧滑入到屏幕中心 * * @param {Node} node - 要执行动画的节点 * @param {number} duration - 动画持续时间(秒),默认0.3秒 @@ -103,7 +103,7 @@ export class UITransitionHelper { */ public static slideInFromLeft( node: Node, - duration: number = 0.1, + duration: number = 0.3, callback?: Function ): void { if (!node || !node.isValid) { @@ -112,18 +112,18 @@ export class UITransitionHelper { } const screenWidth = view.getVisibleSize().width; - const originalPosition = node.getPosition(); + const targetPosition = new Vec3(0, 0, 0); // 设置初始位置为屏幕左侧外 - node.setPosition(-screenWidth, originalPosition.y, originalPosition.z); + node.setPosition(-screenWidth, 0, 0); - // 执行滑入动画 + // 执行滑入动画到屏幕中心 tween(node) .to( duration, - { position: originalPosition }, + { position: targetPosition }, { - easing: "linear", + easing: "cubicOut", } ) .call(() => { @@ -143,7 +143,7 @@ export class UITransitionHelper { */ public static slideOutToRight( node: Node, - duration: number = 0.1, + duration: number = 0.3, callback?: Function ): void { if (!node || !node.isValid) { @@ -165,7 +165,7 @@ export class UITransitionHelper { duration, { position: targetPosition }, { - easing: "linear", + easing: "cubicOut", } ) .call(() => { diff --git a/assets/bundles/Chat18x/GirlDetailPanel.prefab b/assets/bundles/Chat18x/GirlDetailPanel.prefab index 49996dd0..9ce70039 100644 --- a/assets/bundles/Chat18x/GirlDetailPanel.prefab +++ b/assets/bundles/Chat18x/GirlDetailPanel.prefab @@ -24,21 +24,21 @@ ], "_active": true, "_components": [ + { + "__id__": 403 + }, + { + "__id__": 405 + }, + { + "__id__": 407 + }, { "__id__": 409 - }, - { - "__id__": 411 - }, - { - "__id__": 413 - }, - { - "__id__": 415 } ], "_prefab": { - "__id__": 417 + "__id__": 411 }, "_lpos": { "__type__": "cc.Vec3", @@ -88,23 +88,23 @@ "__id__": 15 }, { - "__id__": 391 + "__id__": 385 } ], "_active": true, "_components": [ { - "__id__": 402 + "__id__": 396 }, { - "__id__": 404 + "__id__": 398 }, { - "__id__": 406 + "__id__": 400 } ], "_prefab": { - "__id__": 408 + "__id__": 402 }, "_lpos": { "__type__": "cc.Vec3", @@ -426,17 +426,17 @@ "_active": true, "_components": [ { - "__id__": 384 + "__id__": 378 }, { - "__id__": 386 + "__id__": 380 }, { - "__id__": 388 + "__id__": 382 } ], "_prefab": { - "__id__": 390 + "__id__": 384 }, "_lpos": { "__type__": "cc.Vec3", @@ -7037,31 +7037,28 @@ }, { "__id__": 347 - }, - { - "__id__": 367 } ], "_active": true, "_components": [ + { + "__id__": 367 + }, + { + "__id__": 369 + }, + { + "__id__": 371 + }, { "__id__": 373 }, { "__id__": 375 - }, - { - "__id__": 377 - }, - { - "__id__": 379 - }, - { - "__id__": 381 } ], "_prefab": { - "__id__": 383 + "__id__": 377 }, "_lpos": { "__type__": "cc.Vec3", @@ -8475,165 +8472,6 @@ "targetOverrides": null, "nestedPrefabInstanceRoots": null }, - { - "__type__": "cc.Node", - "_name": "resID", - "_objFlags": 0, - "__editorExtras__": {}, - "_parent": { - "__id__": 304 - }, - "_children": [], - "_active": true, - "_components": [ - { - "__id__": 368 - }, - { - "__id__": 370 - } - ], - "_prefab": { - "__id__": 372 - }, - "_lpos": { - "__type__": "cc.Vec3", - "x": 0, - "y": 0, - "z": 0 - }, - "_lrot": { - "__type__": "cc.Quat", - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "_lscale": { - "__type__": "cc.Vec3", - "x": 1, - "y": 1, - "z": 1 - }, - "_mobility": 0, - "_layer": 33554432, - "_euler": { - "__type__": "cc.Vec3", - "x": 0, - "y": 0, - "z": 0 - }, - "_id": "" - }, - { - "__type__": "cc.UITransform", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 367 - }, - "_enabled": true, - "__prefab": { - "__id__": 369 - }, - "_contentSize": { - "__type__": "cc.Size", - "width": 79.19427490234375, - "height": 54.4 - }, - "_anchorPoint": { - "__type__": "cc.Vec2", - "x": 0.5, - "y": 0.5 - }, - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "bcBKPuun9BloOABIN9mapU" - }, - { - "__type__": "cc.Label", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 367 - }, - "_enabled": true, - "__prefab": { - "__id__": 371 - }, - "_customMaterial": null, - "_srcBlendFactor": 2, - "_dstBlendFactor": 4, - "_color": { - "__type__": "cc.Color", - "r": 255, - "g": 255, - "b": 255, - "a": 255 - }, - "_string": "label", - "_horizontalAlign": 1, - "_verticalAlign": 1, - "_actualFontSize": 35.6, - "_fontSize": 35.6, - "_fontFamily": "Arial", - "_lineHeight": 40, - "_overflow": 0, - "_enableWrapText": true, - "_font": null, - "_isSystemFontUsed": true, - "_spacingX": 0, - "_isItalic": false, - "_isBold": false, - "_isUnderline": false, - "_underlineHeight": 2, - "_cacheMode": 0, - "_enableOutline": true, - "_outlineColor": { - "__type__": "cc.Color", - "r": 0, - "g": 0, - "b": 0, - "a": 255 - }, - "_outlineWidth": 2, - "_enableShadow": false, - "_shadowColor": { - "__type__": "cc.Color", - "r": 0, - "g": 0, - "b": 0, - "a": 255 - }, - "_shadowOffset": { - "__type__": "cc.Vec2", - "x": 2, - "y": 2 - }, - "_shadowBlur": 2, - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "afOpupHGJCM6HANoU8k3zT" - }, - { - "__type__": "cc.PrefabInfo", - "root": { - "__id__": 1 - }, - "asset": { - "__id__": 0 - }, - "fileId": "cdDIgyOJxGjK+HeIfe4Zal", - "instance": null, - "targetOverrides": null, - "nestedPrefabInstanceRoots": null - }, { "__type__": "cc.UITransform", "_name": "", @@ -8644,7 +8482,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 374 + "__id__": 368 }, "_contentSize": { "__type__": "cc.Size", @@ -8672,7 +8510,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 376 + "__id__": 370 }, "clickEvents": [], "_interactable": true, @@ -8730,7 +8568,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 378 + "__id__": 372 }, "img": { "__id__": 308 @@ -8766,7 +8604,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 380 + "__id__": 374 }, "_type": 0, "_inverted": false, @@ -8788,7 +8626,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 382 + "__id__": 376 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -8847,7 +8685,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 385 + "__id__": 379 }, "_contentSize": { "__type__": "cc.Size", @@ -8875,7 +8713,7 @@ }, "_enabled": false, "__prefab": { - "__id__": 387 + "__id__": 381 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -8920,7 +8758,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 389 + "__id__": 383 }, "_alignFlags": 40, "_target": null, @@ -8971,20 +8809,20 @@ "_active": true, "_components": [ { - "__id__": 392 + "__id__": 386 }, { - "__id__": 394 + "__id__": 388 }, { - "__id__": 396 + "__id__": 390 }, { - "__id__": 399 + "__id__": 393 } ], "_prefab": { - "__id__": 401 + "__id__": 395 }, "_lpos": { "__type__": "cc.Vec3", @@ -9021,11 +8859,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 391 + "__id__": 385 }, "_enabled": true, "__prefab": { - "__id__": 393 + "__id__": 387 }, "_contentSize": { "__type__": "cc.Size", @@ -9049,11 +8887,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 391 + "__id__": 385 }, "_enabled": true, "__prefab": { - "__id__": 395 + "__id__": 389 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -9094,15 +8932,15 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 391 + "__id__": 385 }, "_enabled": true, "__prefab": { - "__id__": 397 + "__id__": 391 }, "clickEvents": [ { - "__id__": 398 + "__id__": 392 } ], "_interactable": true, @@ -9142,7 +8980,7 @@ "_duration": 0.1, "_zoomScale": 0.9, "_target": { - "__id__": 391 + "__id__": 385 }, "_id": "" }, @@ -9166,11 +9004,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 391 + "__id__": 385 }, "_enabled": true, "__prefab": { - "__id__": 400 + "__id__": 394 }, "_alignFlags": 9, "_target": null, @@ -9219,7 +9057,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 403 + "__id__": 397 }, "_contentSize": { "__type__": "cc.Size", @@ -9247,7 +9085,7 @@ }, "_enabled": false, "__prefab": { - "__id__": 405 + "__id__": 399 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -9292,7 +9130,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 407 + "__id__": 401 }, "_alignFlags": 45, "_target": null, @@ -9341,7 +9179,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 410 + "__id__": 404 }, "_contentSize": { "__type__": "cc.Size", @@ -9369,7 +9207,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 412 + "__id__": 406 }, "_alignFlags": 45, "_target": null, @@ -9405,7 +9243,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 414 + "__id__": 408 }, "_id": "" }, @@ -9423,7 +9261,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 416 + "__id__": 410 }, "m_rootNode": null, "videoArea": { @@ -9457,7 +9295,7 @@ "__id__": 15 }, "imgItemInst": { - "__id__": 377 + "__id__": 371 }, "imgsLayout": { "__id__": 271 diff --git a/assets/bundles/Chat18x/GirlListPanel.prefab b/assets/bundles/Chat18x/GirlListPanel.prefab index 29ae7f4b..136be574 100644 --- a/assets/bundles/Chat18x/GirlListPanel.prefab +++ b/assets/bundles/Chat18x/GirlListPanel.prefab @@ -24,21 +24,21 @@ ], "_active": true, "_components": [ - { - "__id__": 250 - }, - { - "__id__": 252 - }, { "__id__": 254 }, { "__id__": 256 + }, + { + "__id__": 258 + }, + { + "__id__": 260 } ], "_prefab": { - "__id__": 258 + "__id__": 262 }, "_lpos": { "__type__": "cc.Vec3", @@ -87,18 +87,18 @@ ], "_active": true, "_components": [ - { - "__id__": 243 - }, - { - "__id__": 245 - }, { "__id__": 247 + }, + { + "__id__": 249 + }, + { + "__id__": 251 } ], "_prefab": { - "__id__": 249 + "__id__": 253 }, "_lpos": { "__type__": "cc.Vec3", @@ -4847,23 +4847,23 @@ "__id__": 215 }, { - "__id__": 226 + "__id__": 230 } ], "_active": true, "_components": [ - { - "__id__": 236 - }, - { - "__id__": 238 - }, { "__id__": 240 + }, + { + "__id__": 242 + }, + { + "__id__": 244 } ], "_prefab": { - "__id__": 242 + "__id__": 246 }, "_lpos": { "__type__": "cc.Vec3", @@ -4902,29 +4902,80 @@ "_parent": { "__id__": 214 }, + "_children": [ + { + "__id__": 216 + } + ], + "_active": true, + "_components": [ + { + "__id__": 222 + }, + { + "__id__": 224 + }, + { + "__id__": 227 + } + ], + "_prefab": { + "__id__": 229 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": -461.576, + "y": 0, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "ReturnBtn-001", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 215 + }, "_children": [], "_active": true, "_components": [ { - "__id__": 216 + "__id__": 217 }, { - "__id__": 218 - }, - { - "__id__": 220 - }, - { - "__id__": 223 + "__id__": 219 } ], "_prefab": { - "__id__": 225 + "__id__": 221 }, "_lpos": { "__type__": "cc.Vec3", - "x": -501.576, - "y": -28, + "x": 0, + "y": 0, "z": 0 }, "_lrot": { @@ -4956,11 +5007,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 215 + "__id__": 216 }, "_enabled": true, "__prefab": { - "__id__": 217 + "__id__": 218 }, "_contentSize": { "__type__": "cc.Size", @@ -4969,14 +5020,14 @@ }, "_anchorPoint": { "__type__": "cc.Vec2", - "x": 0, - "y": 0 + "x": 0.5, + "y": 0.5 }, "_id": "" }, { "__type__": "cc.CompPrefabInfo", - "fileId": "e3DPaLU6tFXaqz8O6OhQu4" + "fileId": "77E3QqK6FDnqFZXpMsO08C" }, { "__type__": "cc.Sprite", @@ -4984,11 +5035,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 215 + "__id__": 216 }, "_enabled": true, "__prefab": { - "__id__": 219 + "__id__": 220 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -5021,7 +5072,48 @@ }, { "__type__": "cc.CompPrefabInfo", - "fileId": "131aSg7zxBsY4wDl+1ujCV" + "fileId": "15k1EffxNH2KONVjTgyIXN" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "9aCRghG1lBCa+25qEAugAS", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 215 + }, + "_enabled": true, + "__prefab": { + "__id__": 223 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 100, + "height": 100 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "e3DPaLU6tFXaqz8O6OhQu4" }, { "__type__": "cc.Button", @@ -5033,11 +5125,11 @@ }, "_enabled": true, "__prefab": { - "__id__": 221 + "__id__": 225 }, "clickEvents": [ { - "__id__": 222 + "__id__": 226 } ], "_interactable": true, @@ -5092,7 +5184,7 @@ }, "component": "", "_componentId": "ecf27717xFOIo8F0ultYqJq", - "handler": "close", + "handler": "Return", "customEventData": "" }, { @@ -5105,11 +5197,11 @@ }, "_enabled": true, "__prefab": { - "__id__": 224 + "__id__": 228 }, "_alignFlags": 10, "_target": null, - "_left": 38.42399999999998, + "_left": 28.423999999999978, "_right": 0, "_top": 55.16199999999981, "_bottom": 30, @@ -5155,21 +5247,21 @@ "_children": [], "_active": true, "_components": [ - { - "__id__": 227 - }, - { - "__id__": 229 - }, { "__id__": 231 }, { "__id__": 233 + }, + { + "__id__": 235 + }, + { + "__id__": 237 } ], "_prefab": { - "__id__": 235 + "__id__": 239 }, "_lpos": { "__type__": "cc.Vec3", @@ -5206,11 +5298,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 226 + "__id__": 230 }, "_enabled": true, "__prefab": { - "__id__": 228 + "__id__": 232 }, "_contentSize": { "__type__": "cc.Size", @@ -5234,11 +5326,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 226 + "__id__": 230 }, "_enabled": true, "__prefab": { - "__id__": 230 + "__id__": 234 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -5305,11 +5397,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 226 + "__id__": 230 }, "_enabled": true, "__prefab": { - "__id__": 232 + "__id__": 236 }, "_alignFlags": 18, "_target": null, @@ -5341,11 +5433,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 226 + "__id__": 230 }, "_enabled": true, "__prefab": { - "__id__": 234 + "__id__": 238 }, "languageKey": "girllistpanel.title", "defaultText": "", @@ -5379,7 +5471,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 237 + "__id__": 241 }, "_contentSize": { "__type__": "cc.Size", @@ -5407,7 +5499,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 239 + "__id__": 243 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -5452,7 +5544,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 241 + "__id__": 245 }, "_alignFlags": 41, "_target": null, @@ -5501,7 +5593,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 244 + "__id__": 248 }, "_contentSize": { "__type__": "cc.Size", @@ -5529,7 +5621,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 246 + "__id__": 250 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -5574,7 +5666,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 248 + "__id__": 252 }, "_alignFlags": 45, "_target": null, @@ -5623,7 +5715,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 251 + "__id__": 255 }, "_contentSize": { "__type__": "cc.Size", @@ -5651,7 +5743,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 253 + "__id__": 257 }, "_alignFlags": 45, "_target": null, @@ -5687,7 +5779,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 255 + "__id__": 259 }, "m_rootNode": null, "_id": "" @@ -5706,7 +5798,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 257 + "__id__": 261 }, "_id": "" }, diff --git a/assets/bundles/Chat18x/NavigationPanel.prefab b/assets/bundles/Chat18x/NavigationPanel.prefab new file mode 100644 index 00000000..0861908f --- /dev/null +++ b/assets/bundles/Chat18x/NavigationPanel.prefab @@ -0,0 +1,2834 @@ +[ + { + "__type__": "cc.Prefab", + "_name": "NavigationPanel", + "_objFlags": 0, + "__editorExtras__": {}, + "_native": "", + "data": { + "__id__": 1 + }, + "optimizationPolicy": 0, + "persistent": false + }, + { + "__type__": "cc.Node", + "_name": "NavigationPanel", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": null, + "_children": [ + { + "__id__": 2 + }, + { + "__id__": 32 + }, + { + "__id__": 106 + } + ], + "_active": true, + "_components": [ + { + "__id__": 112 + }, + { + "__id__": 114 + }, + { + "__id__": 116 + } + ], + "_prefab": { + "__id__": 118 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "loadingView", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 1 + }, + "_children": [ + { + "__id__": 3 + } + ], + "_active": true, + "_components": [ + { + "__id__": 27 + }, + { + "__id__": 29 + } + ], + "_prefab": { + "__id__": 31 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "loadingItem", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 2 + }, + "_children": [ + { + "__id__": 4 + }, + { + "__id__": 12 + } + ], + "_active": true, + "_components": [ + { + "__id__": 20 + }, + { + "__id__": 22 + }, + { + "__id__": 24 + } + ], + "_prefab": { + "__id__": 26 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "loadingBg", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 3 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 5 + }, + { + "__id__": 7 + }, + { + "__id__": 9 + } + ], + "_prefab": { + "__id__": 11 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 4 + }, + "_enabled": true, + "__prefab": { + "__id__": 6 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 1080, + "height": 2340 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "a6oOWCs8tDW4zTZv4pCtfm" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 4 + }, + "_enabled": true, + "__prefab": { + "__id__": 8 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 96 + }, + "_spriteFrame": { + "__uuid__": "7d8f9b89-4fd1-4c9f-a3ab-38ec7cded7ca@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_type": 0, + "_fillType": 0, + "_sizeMode": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_useGrayscale": false, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "9aLj8FH5NESbP1GK96fELW" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 4 + }, + "_enabled": true, + "__prefab": { + "__id__": 10 + }, + "_alignFlags": 45, + "_target": null, + "_left": 0, + "_right": 0, + "_top": 0, + "_bottom": 0, + "_horizontalCenter": 0, + "_verticalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 40, + "_originalHeight": 36, + "_alignMode": 2, + "_lockFlags": 0, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "7c2SSU6i1EhYG9OBiJCNOa" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "a0A+zdiZZHUoqW4iAoqus1", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.Node", + "_name": "resLoading", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 3 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 13 + }, + { + "__id__": 15 + }, + { + "__id__": 17 + } + ], + "_prefab": { + "__id__": 19 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 12 + }, + "_enabled": true, + "__prefab": { + "__id__": 14 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 128, + "height": 128 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "4fIbjC9sRCbr0/31m/EtRU" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 12 + }, + "_enabled": true, + "__prefab": { + "__id__": 16 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_spriteFrame": { + "__uuid__": "e8be7976-0d87-45c7-835a-efe2933394ac@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_type": 0, + "_fillType": 0, + "_sizeMode": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_useGrayscale": false, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "da25m89UJDPoSSyta/cLTX" + }, + { + "__type__": "cc.Animation", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 12 + }, + "_enabled": true, + "__prefab": { + "__id__": 18 + }, + "playOnLoad": true, + "_clips": [ + { + "__uuid__": "daac9702-c258-4d3b-8e05-f3a95852e56d", + "__expectedType__": "cc.AnimationClip" + } + ], + "_defaultClip": { + "__uuid__": "daac9702-c258-4d3b-8e05-f3a95852e56d", + "__expectedType__": "cc.AnimationClip" + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "8eOtuEB7NHFr6l8pdXiEs3" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "700BBR/WFIraXok/MetjJC", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 3 + }, + "_enabled": true, + "__prefab": { + "__id__": 21 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 1080, + "height": 2340 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "d4idntpzRPzo8j6xbLF6kt" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 3 + }, + "_enabled": true, + "__prefab": { + "__id__": 23 + }, + "_alignFlags": 45, + "_target": null, + "_left": 0, + "_right": 0, + "_top": 0, + "_bottom": 0, + "_horizontalCenter": 0, + "_verticalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 40, + "_originalHeight": 36, + "_alignMode": 2, + "_lockFlags": 0, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "56KgQLg2JKwYAFNZT/lGqa" + }, + { + "__type__": "38c12VeC51MEarg68KNWAIi", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 3 + }, + "_enabled": true, + "__prefab": { + "__id__": 25 + }, + "animation": { + "__id__": 17 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "8b1Zww7sJBR5BopkqKSc3L" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "9cM/1GlIFLJ5pZaTpc2KTV", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 2 + }, + "_enabled": true, + "__prefab": { + "__id__": 28 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 1080, + "height": 2340 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "08UR1DN9lDkIsNf5A7RzMv" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 2 + }, + "_enabled": true, + "__prefab": { + "__id__": 30 + }, + "_alignFlags": 45, + "_target": null, + "_left": 0, + "_right": 0, + "_top": 0, + "_bottom": 0, + "_horizontalCenter": 0, + "_verticalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 100, + "_originalHeight": 100, + "_alignMode": 2, + "_lockFlags": 0, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "ed8Uf0oQJIdbCaNG5h+01d" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "886Z2X4uhD8Y/vUVZFRbSZ", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.Node", + "_name": "NavigationBar", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 1 + }, + "_children": [ + { + "__id__": 33 + }, + { + "__id__": 49 + }, + { + "__id__": 65 + }, + { + "__id__": 81 + } + ], + "_active": true, + "_components": [ + { + "__id__": 97 + }, + { + "__id__": 99 + }, + { + "__id__": 101 + }, + { + "__id__": 103 + } + ], + "_prefab": { + "__id__": 105 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": -1170, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "themeBtn", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 32 + }, + "_children": [ + { + "__id__": 34 + } + ], + "_active": true, + "_components": [ + { + "__id__": 40 + }, + { + "__id__": 42 + }, + { + "__id__": 44 + }, + { + "__id__": 46 + } + ], + "_prefab": { + "__id__": 48 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": -407.1, + "y": 130.25, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "Label", + "_objFlags": 512, + "__editorExtras__": {}, + "_parent": { + "__id__": 33 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 35 + }, + { + "__id__": 37 + } + ], + "_prefab": { + "__id__": 39 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 34 + }, + "_enabled": true, + "__prefab": { + "__id__": 36 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 100, + "height": 134.946 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "a3fReHRLRFKaQ32L2c7xkB" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 34 + }, + "_enabled": true, + "__prefab": { + "__id__": 38 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_string": "主题", + "_horizontalAlign": 1, + "_verticalAlign": 1, + "_actualFontSize": 50, + "_fontSize": 50, + "_fontFamily": "Arial", + "_lineHeight": 107.1, + "_overflow": 0, + "_enableWrapText": false, + "_font": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_isItalic": false, + "_isBold": false, + "_isUnderline": false, + "_underlineHeight": 2, + "_cacheMode": 0, + "_enableOutline": false, + "_outlineColor": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_outlineWidth": 2, + "_enableShadow": false, + "_shadowColor": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_shadowOffset": { + "__type__": "cc.Vec2", + "x": 2, + "y": 2 + }, + "_shadowBlur": 2, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "28FsFlkddMwoPBe1UdeyBg" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "1fFSDf7UNFmpofDj5mg1gj", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 33 + }, + "_enabled": true, + "__prefab": { + "__id__": 41 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 261.8, + "height": 222.3 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "2eO+um3K9Osal9/dXFs8r1" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 33 + }, + "_enabled": true, + "__prefab": { + "__id__": 43 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_spriteFrame": { + "__uuid__": "20835ba4-6145-4fbc-a58a-051ce700aa3e@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_type": 1, + "_fillType": 0, + "_sizeMode": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_useGrayscale": false, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "faDHN245VEZ4nhW4kDvxT0" + }, + { + "__type__": "cc.Button", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 33 + }, + "_enabled": true, + "__prefab": { + "__id__": 45 + }, + "clickEvents": [], + "_interactable": true, + "_transition": 3, + "_normalColor": { + "__type__": "cc.Color", + "r": 214, + "g": 214, + "b": 214, + "a": 255 + }, + "_hoverColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "_pressedColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_disabledColor": { + "__type__": "cc.Color", + "r": 124, + "g": 124, + "b": 124, + "a": 255 + }, + "_normalSprite": { + "__uuid__": "20835ba4-6145-4fbc-a58a-051ce700aa3e@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_hoverSprite": { + "__uuid__": "20835ba4-6145-4fbc-a58a-051ce700aa3e@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_pressedSprite": { + "__uuid__": "544e49d6-3f05-4fa8-9a9e-091f98fc2ce8@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_disabledSprite": { + "__uuid__": "951249e0-9f16-456d-8b85-a6ca954da16b@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_duration": 0.1, + "_zoomScale": 0.9, + "_target": { + "__id__": 33 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "d4RPf+YE5GSYk8FM1ocPRS" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 33 + }, + "_enabled": true, + "__prefab": { + "__id__": 47 + }, + "_alignFlags": 1, + "_target": null, + "_left": 0, + "_right": 0, + "_top": 0, + "_bottom": 0, + "_horizontalCenter": 0, + "_verticalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 0, + "_originalHeight": 0, + "_alignMode": 2, + "_lockFlags": 0, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "28gsPZcMFKv615Jb9KGm49" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "c1s+3zCjVNM7NtaITtdr83", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.Node", + "_name": "girlDetailBtn", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 32 + }, + "_children": [ + { + "__id__": 50 + } + ], + "_active": true, + "_components": [ + { + "__id__": 56 + }, + { + "__id__": 58 + }, + { + "__id__": 60 + }, + { + "__id__": 62 + } + ], + "_prefab": { + "__id__": 64 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": -136.70000000000005, + "y": 130.25, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "Label", + "_objFlags": 512, + "__editorExtras__": {}, + "_parent": { + "__id__": 49 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 51 + }, + { + "__id__": 53 + } + ], + "_prefab": { + "__id__": 55 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 50 + }, + "_enabled": true, + "__prefab": { + "__id__": 52 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 100, + "height": 134.946 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "2fXV8HUlJB0o1TjztuXtkK" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 50 + }, + "_enabled": true, + "__prefab": { + "__id__": 54 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_string": "详情", + "_horizontalAlign": 1, + "_verticalAlign": 1, + "_actualFontSize": 50, + "_fontSize": 50, + "_fontFamily": "Arial", + "_lineHeight": 107.1, + "_overflow": 0, + "_enableWrapText": false, + "_font": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_isItalic": false, + "_isBold": false, + "_isUnderline": false, + "_underlineHeight": 2, + "_cacheMode": 0, + "_enableOutline": false, + "_outlineColor": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_outlineWidth": 2, + "_enableShadow": false, + "_shadowColor": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_shadowOffset": { + "__type__": "cc.Vec2", + "x": 2, + "y": 2 + }, + "_shadowBlur": 2, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "11c0dbgvNHjZKJeaG1HG+G" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "cbs78wRu9FNbfcetd+2EO5", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 49 + }, + "_enabled": true, + "__prefab": { + "__id__": 57 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 261.8, + "height": 222.3 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "68WzXw8v1LubyO1J4uhpkH" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 49 + }, + "_enabled": true, + "__prefab": { + "__id__": 59 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_spriteFrame": { + "__uuid__": "20835ba4-6145-4fbc-a58a-051ce700aa3e@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_type": 1, + "_fillType": 0, + "_sizeMode": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_useGrayscale": false, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "5ab7oxH8JBH6xHl/7Y5Wwy" + }, + { + "__type__": "cc.Button", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 49 + }, + "_enabled": true, + "__prefab": { + "__id__": 61 + }, + "clickEvents": [], + "_interactable": true, + "_transition": 3, + "_normalColor": { + "__type__": "cc.Color", + "r": 214, + "g": 214, + "b": 214, + "a": 255 + }, + "_hoverColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "_pressedColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_disabledColor": { + "__type__": "cc.Color", + "r": 124, + "g": 124, + "b": 124, + "a": 255 + }, + "_normalSprite": { + "__uuid__": "20835ba4-6145-4fbc-a58a-051ce700aa3e@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_hoverSprite": { + "__uuid__": "20835ba4-6145-4fbc-a58a-051ce700aa3e@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_pressedSprite": { + "__uuid__": "544e49d6-3f05-4fa8-9a9e-091f98fc2ce8@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_disabledSprite": { + "__uuid__": "951249e0-9f16-456d-8b85-a6ca954da16b@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_duration": 0.1, + "_zoomScale": 0.9, + "_target": { + "__id__": 49 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "ecfHcQqIdIaIxzCt6TBSFW" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 49 + }, + "_enabled": true, + "__prefab": { + "__id__": 63 + }, + "_alignFlags": 1, + "_target": null, + "_left": 0, + "_right": 0, + "_top": 0, + "_bottom": 0, + "_horizontalCenter": 0, + "_verticalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 0, + "_originalHeight": 0, + "_alignMode": 2, + "_lockFlags": 0, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "8byUQtXZFE1LQ5+xkdPcmc" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "cfesmKf1xOdaTjLhKcA4dv", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.Node", + "_name": "chatBtn", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 32 + }, + "_children": [ + { + "__id__": 66 + } + ], + "_active": true, + "_components": [ + { + "__id__": 72 + }, + { + "__id__": 74 + }, + { + "__id__": 76 + }, + { + "__id__": 78 + } + ], + "_prefab": { + "__id__": 80 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 133.69999999999996, + "y": 130.25, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "Label", + "_objFlags": 512, + "__editorExtras__": {}, + "_parent": { + "__id__": 65 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 67 + }, + { + "__id__": 69 + } + ], + "_prefab": { + "__id__": 71 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 66 + }, + "_enabled": true, + "__prefab": { + "__id__": 68 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 100, + "height": 134.946 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "4b7SN60QNE3LloFCVdLXY4" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 66 + }, + "_enabled": true, + "__prefab": { + "__id__": 70 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_string": "聊天", + "_horizontalAlign": 1, + "_verticalAlign": 1, + "_actualFontSize": 50, + "_fontSize": 50, + "_fontFamily": "Arial", + "_lineHeight": 107.1, + "_overflow": 0, + "_enableWrapText": false, + "_font": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_isItalic": false, + "_isBold": false, + "_isUnderline": false, + "_underlineHeight": 2, + "_cacheMode": 0, + "_enableOutline": false, + "_outlineColor": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_outlineWidth": 2, + "_enableShadow": false, + "_shadowColor": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_shadowOffset": { + "__type__": "cc.Vec2", + "x": 2, + "y": 2 + }, + "_shadowBlur": 2, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "4fA1po1F9Dp6XNDS/flzKs" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "45xictZdRMgbRP5z0Ifd6V", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 65 + }, + "_enabled": true, + "__prefab": { + "__id__": 73 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 261.8, + "height": 222.3 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "64eQVvfZ1Jd6Txipsnfyos" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 65 + }, + "_enabled": true, + "__prefab": { + "__id__": 75 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_spriteFrame": { + "__uuid__": "20835ba4-6145-4fbc-a58a-051ce700aa3e@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_type": 1, + "_fillType": 0, + "_sizeMode": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_useGrayscale": false, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "02U6DSKH5Cr5wobecN02TD" + }, + { + "__type__": "cc.Button", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 65 + }, + "_enabled": true, + "__prefab": { + "__id__": 77 + }, + "clickEvents": [], + "_interactable": true, + "_transition": 3, + "_normalColor": { + "__type__": "cc.Color", + "r": 214, + "g": 214, + "b": 214, + "a": 255 + }, + "_hoverColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "_pressedColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_disabledColor": { + "__type__": "cc.Color", + "r": 124, + "g": 124, + "b": 124, + "a": 255 + }, + "_normalSprite": { + "__uuid__": "20835ba4-6145-4fbc-a58a-051ce700aa3e@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_hoverSprite": { + "__uuid__": "20835ba4-6145-4fbc-a58a-051ce700aa3e@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_pressedSprite": { + "__uuid__": "544e49d6-3f05-4fa8-9a9e-091f98fc2ce8@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_disabledSprite": { + "__uuid__": "951249e0-9f16-456d-8b85-a6ca954da16b@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_duration": 0.1, + "_zoomScale": 0.9, + "_target": { + "__id__": 65 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "1aoq5nNRJAxYARZuF7JJes" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 65 + }, + "_enabled": true, + "__prefab": { + "__id__": 79 + }, + "_alignFlags": 1, + "_target": null, + "_left": 0, + "_right": 0, + "_top": 0, + "_bottom": 0, + "_horizontalCenter": 0, + "_verticalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 0, + "_originalHeight": 0, + "_alignMode": 2, + "_lockFlags": 0, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "1cIXYs0tRAta73qTmOjikZ" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "31DFTEsXNKTaX9uocyTrw4", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.Node", + "_name": "settingBtn", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 32 + }, + "_children": [ + { + "__id__": 82 + } + ], + "_active": true, + "_components": [ + { + "__id__": 88 + }, + { + "__id__": 90 + }, + { + "__id__": 92 + }, + { + "__id__": 94 + } + ], + "_prefab": { + "__id__": 96 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 404.09999999999997, + "y": 130.25, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "Label", + "_objFlags": 512, + "__editorExtras__": {}, + "_parent": { + "__id__": 81 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 83 + }, + { + "__id__": 85 + } + ], + "_prefab": { + "__id__": 87 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 82 + }, + "_enabled": true, + "__prefab": { + "__id__": 84 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 254.499963, + "height": 134.946 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "2aWdrgVb1JI7F+4Tf1ThFt" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 82 + }, + "_enabled": true, + "__prefab": { + "__id__": 86 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_string": "个人信息", + "_horizontalAlign": 1, + "_verticalAlign": 1, + "_actualFontSize": 50, + "_fontSize": 50, + "_fontFamily": "Arial", + "_lineHeight": 107.1, + "_overflow": 2, + "_enableWrapText": false, + "_font": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_isItalic": false, + "_isBold": false, + "_isUnderline": false, + "_underlineHeight": 2, + "_cacheMode": 0, + "_enableOutline": false, + "_outlineColor": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_outlineWidth": 2, + "_enableShadow": false, + "_shadowColor": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_shadowOffset": { + "__type__": "cc.Vec2", + "x": 2, + "y": 2 + }, + "_shadowBlur": 2, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "36CFi18HJAC55WX0Lq0HOU" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "04XSzTmvpMIrIwWzL5ZqIG", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 81 + }, + "_enabled": true, + "__prefab": { + "__id__": 89 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 261.8, + "height": 222.3 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "01vsnV3zNGTZVuhrOhwU4f" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 81 + }, + "_enabled": true, + "__prefab": { + "__id__": 91 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_spriteFrame": { + "__uuid__": "20835ba4-6145-4fbc-a58a-051ce700aa3e@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_type": 1, + "_fillType": 0, + "_sizeMode": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_useGrayscale": false, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "1cJ5NAHu1OMqA6fQ1sf3OK" + }, + { + "__type__": "cc.Button", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 81 + }, + "_enabled": true, + "__prefab": { + "__id__": 93 + }, + "clickEvents": [], + "_interactable": true, + "_transition": 3, + "_normalColor": { + "__type__": "cc.Color", + "r": 214, + "g": 214, + "b": 214, + "a": 255 + }, + "_hoverColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "_pressedColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_disabledColor": { + "__type__": "cc.Color", + "r": 124, + "g": 124, + "b": 124, + "a": 255 + }, + "_normalSprite": { + "__uuid__": "20835ba4-6145-4fbc-a58a-051ce700aa3e@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_hoverSprite": { + "__uuid__": "20835ba4-6145-4fbc-a58a-051ce700aa3e@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_pressedSprite": { + "__uuid__": "544e49d6-3f05-4fa8-9a9e-091f98fc2ce8@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_disabledSprite": { + "__uuid__": "951249e0-9f16-456d-8b85-a6ca954da16b@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_duration": 0.1, + "_zoomScale": 0.9, + "_target": { + "__id__": 81 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "9ekFivtj9K45kHlrgltNiE" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 81 + }, + "_enabled": true, + "__prefab": { + "__id__": 95 + }, + "_alignFlags": 1, + "_target": null, + "_left": 0, + "_right": 0, + "_top": 0, + "_bottom": 0, + "_horizontalCenter": 0, + "_verticalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 0, + "_originalHeight": 0, + "_alignMode": 2, + "_lockFlags": 0, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "96P+6nTK5Mr48hEvIVKn7N" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "efoUn4o2ZO+aiZfwwuh4cg", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 32 + }, + "_enabled": true, + "__prefab": { + "__id__": 98 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 1080, + "height": 241.4 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "8aZ/T80+FGzL6v4wcZHsW/" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 32 + }, + "_enabled": true, + "__prefab": { + "__id__": 100 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_spriteFrame": { + "__uuid__": "7d8f9b89-4fd1-4c9f-a3ab-38ec7cded7ca@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_type": 0, + "_fillType": 0, + "_sizeMode": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_useGrayscale": false, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "30ltjx2GdG+Kh9c4rAn6zm" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 32 + }, + "_enabled": true, + "__prefab": { + "__id__": 102 + }, + "_alignFlags": 44, + "_target": null, + "_left": 0, + "_right": 0, + "_top": 0, + "_bottom": 0, + "_horizontalCenter": 0, + "_verticalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 100, + "_originalHeight": 0, + "_alignMode": 2, + "_lockFlags": 0, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "cdZgUmIVtNqJxuMwTB9vFe" + }, + { + "__type__": "cc.Layout", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 32 + }, + "_enabled": true, + "__prefab": { + "__id__": 104 + }, + "_resizeMode": 0, + "_layoutType": 1, + "_cellSize": { + "__type__": "cc.Size", + "width": 40, + "height": 40 + }, + "_startAxis": 0, + "_paddingLeft": 2, + "_paddingRight": 2, + "_paddingTop": 0, + "_paddingBottom": 0, + "_spacingX": 8.6, + "_spacingY": 0, + "_verticalDirection": 1, + "_horizontalDirection": 0, + "_constraint": 0, + "_constraintNum": 2, + "_affectedByScale": false, + "_isAlign": false, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "d2kTEZonlJh6ZnefcvX1Pp" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "8aYQ1JDQlHjIHWPy53QtZL", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.Node", + "_name": "CurrentPanel", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 107 + }, + { + "__id__": 109 + } + ], + "_prefab": { + "__id__": 111 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": -987.592, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 106 + }, + "_enabled": true, + "__prefab": { + "__id__": 108 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 142.387939453125, + "height": 138.06400000000002 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "29XjHrZmhObakf4OftdpTw" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 106 + }, + "_enabled": true, + "__prefab": { + "__id__": 110 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_string": "label", + "_horizontalAlign": 1, + "_verticalAlign": 2, + "_actualFontSize": 65.5, + "_fontSize": 65.5, + "_fontFamily": "Arial", + "_lineHeight": 106.4, + "_overflow": 0, + "_enableWrapText": true, + "_font": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_isItalic": false, + "_isBold": false, + "_isUnderline": false, + "_underlineHeight": 2, + "_cacheMode": 0, + "_enableOutline": true, + "_outlineColor": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_outlineWidth": 2, + "_enableShadow": false, + "_shadowColor": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_shadowOffset": { + "__type__": "cc.Vec2", + "x": 2, + "y": 2 + }, + "_shadowBlur": 2, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "6dZ6ogIA5BIaGbOynLSeW0" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "59Cyl9aXlAjq2NzWmLEQZV", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 113 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 1080, + "height": 2340 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "faCrQfoWdHPYdqXKyB7bpx" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 115 + }, + "_alignFlags": 45, + "_target": null, + "_left": 0, + "_right": 0, + "_top": 0, + "_bottom": 0, + "_horizontalCenter": 0, + "_verticalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 100, + "_originalHeight": 100, + "_alignMode": 2, + "_lockFlags": 0, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "04fdwoX/5DEYLyEFVD+dMw" + }, + { + "__type__": "58d92VJVKlPmJSvXAw6wvhT", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 117 + }, + "m_rootNode": null, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "38H5Er7rFEmZs2Lgg3bQfs" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "c56bV1FwVJ/7xcvtcuC3oM", + "instance": null, + "targetOverrides": null + } +] \ No newline at end of file diff --git a/assets/bundles/Chat18x/NavigationPanel.prefab.meta b/assets/bundles/Chat18x/NavigationPanel.prefab.meta new file mode 100644 index 00000000..9ed46ec4 --- /dev/null +++ b/assets/bundles/Chat18x/NavigationPanel.prefab.meta @@ -0,0 +1,13 @@ +{ + "ver": "1.1.50", + "importer": "prefab", + "imported": true, + "uuid": "071b7a07-4a74-4a39-962b-ccbab803a523", + "files": [ + ".json" + ], + "subMetas": {}, + "userData": { + "syncNodeName": "NavigationPanel" + } +}