diff --git a/assets/Scripts/Sub/UI/PreloadUI.ts b/assets/Scripts/Sub/UI/PreloadUI.ts index c0252306..63985fe1 100644 --- a/assets/Scripts/Sub/UI/PreloadUI.ts +++ b/assets/Scripts/Sub/UI/PreloadUI.ts @@ -69,12 +69,20 @@ export class PreloadUI extends Component { //Utils.addInnerEL(InnerMsgCode.UI_ShowPrompt, this, this.resiveShowPrompt) Utils.parseNode(this.node, this._nodeTab); + // 添加新的事件监听 + this.appVersion = this._nodeTab.appVersion.getComponent(Label); this.loginBtn = this._nodeTab.btnLogin; this.loginBtn.active = false; this.appVersion.string = `app version: ${prodConfig.appVersion}`; this.VideoPlayer = this._nodeTab.VideoPlayer.getComponent(VideoPlayer); + this.VideoPlayer.node.on( + VideoPlayer.EventType.META_LOADED, + this.onVideoReadyToPlay, + this + ); + GButton.BandClick(this.loginBtn, this.onLogin, this); this.jinduBar = this.node.getChildByName("jinduBar"); @@ -105,10 +113,12 @@ export class PreloadUI extends Component { this.preloadFiles(); } - protected onDestroy(): void { - - } + protected onDestroy(): void {} + onVideoReadyToPlay() { + console.log("Video Ready"); + this._nodeTab.VideoPlayer.getComponent(VideoPlayer).play(); + } update(deltaTime: number) { if (!this.preloadFinish) { return; diff --git a/assets/Scripts/chat18x/core/ChatController.ts b/assets/Scripts/chat18x/core/ChatController.ts index 2a6e5b7e..1d0c18e5 100644 --- a/assets/Scripts/chat18x/core/ChatController.ts +++ b/assets/Scripts/chat18x/core/ChatController.ts @@ -223,25 +223,15 @@ export class ChatController { // 通知界面收到回复 this.callback?.onMessageReceived(response); - // 增加聊天次数计数 - //this.chatModel.incrementChatCount(); - // 注意:情绪状态将通过异步事件更新,不在这里同步获取 console.log(`Response received from role ${roleId}: ${response}`); return true; } else { - // 移除加载中的对话 - //this.dialogManager?.removeLoadingDialog(); - - const error = new Error("AI返回了空响应"); - this.handleError(error); return false; } } catch (error) { - // 移除加载中的对话 - //this.dialogManager?.removeLoadingDialog(); - + ErrorHandler.Instance.handleApiError( error, "ChatController.sendMessage", diff --git a/assets/Scripts/chat18x/manager/NavigationManager.ts b/assets/Scripts/chat18x/manager/NavigationManager.ts index 75bdddd6..7ce2bae9 100644 --- a/assets/Scripts/chat18x/manager/NavigationManager.ts +++ b/assets/Scripts/chat18x/manager/NavigationManager.ts @@ -87,7 +87,7 @@ export class NavigationManager { //初始化默认选的girl let cacheGirlId = sys.localStorage.getItem(this.LastSelectGirlID); if (!cacheGirlId) { - cacheGirlId = 10002; + cacheGirlId = 10016; sys.localStorage.setItem(this.LastSelectGirlID, cacheGirlId); } this._instance.selectedGirlId = Number(cacheGirlId); @@ -355,7 +355,6 @@ export class NavigationManager { `[NavigationManager] 无法确定basePanel类型: ${basePanel.name}` ); } - // 存储动画配置 this.subPanelAnimationConfigs.set(n, config); @@ -466,6 +465,7 @@ export class NavigationManager { } const duration = config.duration || 0.3; + //panel.active = false; switch (config.openAnimation) { case PageTransitionType.SCALE: diff --git a/assets/Scripts/chat18x/ui/panels/ChatPanel.ts b/assets/Scripts/chat18x/ui/panels/ChatPanel.ts index 3fc8d329..ada78b37 100644 --- a/assets/Scripts/chat18x/ui/panels/ChatPanel.ts +++ b/assets/Scripts/chat18x/ui/panels/ChatPanel.ts @@ -92,6 +92,11 @@ export class ChatPanel extends li_BaseView implements IChatPanelCallback { } onLoadCT() { + this.node.active = false; + this.scheduleOnce(() => { + this.node.active = true; + }, 0.1); + Utils.parseNode(this.node, this._nodeTab); this.waitingAI = this._nodeTab.waitingAI; diff --git a/assets/Scripts/chat18x/ui/panels/GirlListPanel.ts b/assets/Scripts/chat18x/ui/panels/GirlListPanel.ts index 1c69549b..006641f4 100644 --- a/assets/Scripts/chat18x/ui/panels/GirlListPanel.ts +++ b/assets/Scripts/chat18x/ui/panels/GirlListPanel.ts @@ -28,6 +28,10 @@ export class GirlListPanel extends li_BaseView { category: number; onLoadCT() { + this.node.active = false; + this.scheduleOnce(() => { + this.node.active = true; + }, 0.1); Utils.parseNode(this.node, this._nodeTab); this.registerListener(); this.itemInst = this._nodeTab.BubbleItem.getComponent(GirlListItem); diff --git a/assets/Scripts/chat18x/ui/panels/GirlListPopupPanel.ts b/assets/Scripts/chat18x/ui/panels/GirlListPopupPanel.ts index 3ec757d3..83ae9ee9 100644 --- a/assets/Scripts/chat18x/ui/panels/GirlListPopupPanel.ts +++ b/assets/Scripts/chat18x/ui/panels/GirlListPopupPanel.ts @@ -121,7 +121,6 @@ export class GirlListPopupPanel extends li_BaseView { this.close(); TipsPanel.show("Buy Succeed"); } else { - //ViewManager.I.openBundlesView("PurchasePanel"); this.close(); TipsPanel.show("Insufficient balance, need to purchase"); } diff --git a/assets/Scripts/chat18x/ui/panels/PersonalPanel.ts b/assets/Scripts/chat18x/ui/panels/PersonalPanel.ts index dbea7279..09421a14 100644 --- a/assets/Scripts/chat18x/ui/panels/PersonalPanel.ts +++ b/assets/Scripts/chat18x/ui/panels/PersonalPanel.ts @@ -20,7 +20,10 @@ import LanguageUtils, { LanguageType, } from "../../../Main/Common/LanguageUtils"; import AudioManager from "../../../Main/Manager/AudioManager"; -import { NavigationManager } from "../../manager/NavigationManager"; +import { + NavigationManager, + PageTransitionType, +} from "../../manager/NavigationManager"; import { PlayerDataService } from "../../network/services/PlayerDataService"; import proto from "db://assets/Scripts/proto/proto.pb.js"; @@ -150,6 +153,9 @@ export class PersonalPanel extends li_BaseView { NavigationManager.Instance.openSubPanel("SettingPanel", this.node); } private openPurchase() { - NavigationManager.Instance.openSubPanel("PurchasePanel", this.node); + NavigationManager.Instance.openSubPanel("PurchasePanel", this.node, null, { + openAnimation: PageTransitionType.SLIDE_LEFT, + closeAnimation: PageTransitionType.SLIDE_RIGHT, + }); } } diff --git a/assets/Scripts/chat18x/ui/panels/PurchasePanel.ts b/assets/Scripts/chat18x/ui/panels/PurchasePanel.ts index 30e25f5c..c776982e 100644 --- a/assets/Scripts/chat18x/ui/panels/PurchasePanel.ts +++ b/assets/Scripts/chat18x/ui/panels/PurchasePanel.ts @@ -44,6 +44,11 @@ export class PurchasePanel extends li_BaseView { web3BtnNotSelect; onLoadCT(): void { + this.node.active = false; + this.scheduleOnce(() => { + this.node.active = true; + }, 0.2); + Utils.parseNode(this.node, this._nodeTab); this.coinNum = this._nodeTab.coinNum.getComponent(Label); this.vipLeftTime = this._nodeTab.vipText.getComponent(Label); diff --git a/assets/Scripts/chat18x/ui/panels/ThemePanel.ts b/assets/Scripts/chat18x/ui/panels/ThemePanel.ts index 13310a27..2521b0b1 100644 --- a/assets/Scripts/chat18x/ui/panels/ThemePanel.ts +++ b/assets/Scripts/chat18x/ui/panels/ThemePanel.ts @@ -294,7 +294,10 @@ export class ThemePanel extends li_BaseView { } enterShop() { - NavigationManager.Instance.openSubPanel("PurchasePanel", this.node); + NavigationManager.Instance.openSubPanel("PurchasePanel", this.node, null, { + openAnimation: PageTransitionType.SLIDE_LEFT, + closeAnimation: PageTransitionType.SLIDE_RIGHT, + }); } chatWithRec() { diff --git a/assets/Scripts/chat18x/uiitems/ThemeItem.ts b/assets/Scripts/chat18x/uiitems/ThemeItem.ts index e402518d..d88093e3 100644 --- a/assets/Scripts/chat18x/uiitems/ThemeItem.ts +++ b/assets/Scripts/chat18x/uiitems/ThemeItem.ts @@ -96,6 +96,14 @@ export class ThemeItem extends Component { this.category ); NavigationManager.Instance.setSelectedCategoryId(this.category); - NavigationManager.Instance.openSubPanel("GirlListPanel", this.baseNode); + NavigationManager.Instance.openSubPanel( + "GirlListPanel", + this.baseNode, + null, + { + openAnimation: PageTransitionType.SLIDE_LEFT, + closeAnimation: PageTransitionType.SLIDE_RIGHT, + } + ); } } diff --git a/assets/Scripts/chat18x/utils/UITransitionHelper.ts b/assets/Scripts/chat18x/utils/UITransitionHelper.ts index 24343f52..690af136 100644 --- a/assets/Scripts/chat18x/utils/UITransitionHelper.ts +++ b/assets/Scripts/chat18x/utils/UITransitionHelper.ts @@ -42,7 +42,7 @@ export class UITransitionHelper { // 设置初始位置为屏幕右侧外 node.setPosition(screenWidth, 0, 0); - + // 执行滑入动画到屏幕中心 tween(node) .to( diff --git a/assets/bundles/Chat18x/ChatPanel.prefab b/assets/bundles/Chat18x/ChatPanel.prefab index f6cc4f0e..05968bef 100644 --- a/assets/bundles/Chat18x/ChatPanel.prefab +++ b/assets/bundles/Chat18x/ChatPanel.prefab @@ -1060,7 +1060,7 @@ "_originalWidth": 0, "_originalHeight": 64, "_alignMode": 2, - "_lockFlags": 12, + "_lockFlags": 4, "_id": "" }, { diff --git a/assets/bundles/Chat18x/GirlListPanel.prefab b/assets/bundles/Chat18x/GirlListPanel.prefab index 8f0282b4..4354be01 100644 --- a/assets/bundles/Chat18x/GirlListPanel.prefab +++ b/assets/bundles/Chat18x/GirlListPanel.prefab @@ -163,7 +163,7 @@ "_lpos": { "__type__": "cc.Vec3", "x": 0, - "y": -73.70000000000005, + "y": -81.85000000000002, "z": 0 }, "_lrot": { @@ -4358,7 +4358,7 @@ "_contentSize": { "__type__": "cc.Size", "width": 1080, - "height": 1712 + "height": 1695.6999999999998 }, "_anchorPoint": { "__type__": "cc.Vec2", @@ -4503,7 +4503,7 @@ "_contentSize": { "__type__": "cc.Size", "width": 1080, - "height": 1712 + "height": 1695.6999999999998 }, "_anchorPoint": { "__type__": "cc.Vec2", @@ -4656,7 +4656,7 @@ "_contentSize": { "__type__": "cc.Size", "width": 1080, - "height": 1967.6 + "height": 1951.3 }, "_anchorPoint": { "__type__": "cc.Vec2", @@ -4685,7 +4685,7 @@ "_target": null, "_left": 0, "_right": 0, - "_top": 147.4, + "_top": 163.7, "_bottom": 0, "_horizontalCenter": 0, "_verticalCenter": 0, @@ -5637,7 +5637,7 @@ "_originalWidth": 100, "_originalHeight": 100, "_alignMode": 2, - "_lockFlags": 45, + "_lockFlags": 0, "_id": "" }, { diff --git a/xchat_cfg b/xchat_cfg index 84a1cc52..00e9816c 160000 --- a/xchat_cfg +++ b/xchat_cfg @@ -1 +1 @@ -Subproject commit 84a1cc52c38fe0750b729a5a671d501436d69fae +Subproject commit 00e9816c33d86c1a32dcf43e86fb4f1b3fe6ac0a