update 页面跳转
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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,
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ export class UITransitionHelper {
|
||||
|
||||
// 设置初始位置为屏幕右侧外
|
||||
node.setPosition(screenWidth, 0, 0);
|
||||
|
||||
|
||||
// 执行滑入动画到屏幕中心
|
||||
tween(node)
|
||||
.to(
|
||||
|
||||
@@ -1060,7 +1060,7 @@
|
||||
"_originalWidth": 0,
|
||||
"_originalHeight": 64,
|
||||
"_alignMode": 2,
|
||||
"_lockFlags": 12,
|
||||
"_lockFlags": 4,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
|
||||
@@ -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": ""
|
||||
},
|
||||
{
|
||||
|
||||
+1
-1
Submodule xchat_cfg updated: 84a1cc52c3...00e9816c33
Reference in New Issue
Block a user