update 页面跳转
This commit is contained in:
@@ -69,12 +69,20 @@ export class PreloadUI extends Component {
|
|||||||
//Utils.addInnerEL(InnerMsgCode.UI_ShowPrompt, this, this.resiveShowPrompt)
|
//Utils.addInnerEL(InnerMsgCode.UI_ShowPrompt, this, this.resiveShowPrompt)
|
||||||
Utils.parseNode(this.node, this._nodeTab);
|
Utils.parseNode(this.node, this._nodeTab);
|
||||||
|
|
||||||
|
// 添加新的事件监听
|
||||||
|
|
||||||
this.appVersion = this._nodeTab.appVersion.getComponent(Label);
|
this.appVersion = this._nodeTab.appVersion.getComponent(Label);
|
||||||
this.loginBtn = this._nodeTab.btnLogin;
|
this.loginBtn = this._nodeTab.btnLogin;
|
||||||
this.loginBtn.active = false;
|
this.loginBtn.active = false;
|
||||||
this.appVersion.string = `app version: ${prodConfig.appVersion}`;
|
this.appVersion.string = `app version: ${prodConfig.appVersion}`;
|
||||||
this.VideoPlayer = this._nodeTab.VideoPlayer.getComponent(VideoPlayer);
|
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);
|
GButton.BandClick(this.loginBtn, this.onLogin, this);
|
||||||
|
|
||||||
this.jinduBar = this.node.getChildByName("jinduBar");
|
this.jinduBar = this.node.getChildByName("jinduBar");
|
||||||
@@ -105,10 +113,12 @@ export class PreloadUI extends Component {
|
|||||||
this.preloadFiles();
|
this.preloadFiles();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected onDestroy(): void {
|
protected onDestroy(): void {}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
onVideoReadyToPlay() {
|
||||||
|
console.log("Video Ready");
|
||||||
|
this._nodeTab.VideoPlayer.getComponent(VideoPlayer).play();
|
||||||
|
}
|
||||||
update(deltaTime: number) {
|
update(deltaTime: number) {
|
||||||
if (!this.preloadFinish) {
|
if (!this.preloadFinish) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -223,25 +223,15 @@ export class ChatController {
|
|||||||
// 通知界面收到回复
|
// 通知界面收到回复
|
||||||
this.callback?.onMessageReceived(response);
|
this.callback?.onMessageReceived(response);
|
||||||
|
|
||||||
// 增加聊天次数计数
|
|
||||||
//this.chatModel.incrementChatCount();
|
|
||||||
|
|
||||||
// 注意:情绪状态将通过异步事件更新,不在这里同步获取
|
// 注意:情绪状态将通过异步事件更新,不在这里同步获取
|
||||||
|
|
||||||
console.log(`Response received from role ${roleId}: ${response}`);
|
console.log(`Response received from role ${roleId}: ${response}`);
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
// 移除加载中的对话
|
|
||||||
//this.dialogManager?.removeLoadingDialog();
|
|
||||||
|
|
||||||
const error = new Error("AI返回了空响应");
|
|
||||||
this.handleError(error);
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
// 移除加载中的对话
|
|
||||||
//this.dialogManager?.removeLoadingDialog();
|
|
||||||
|
|
||||||
ErrorHandler.Instance.handleApiError(
|
ErrorHandler.Instance.handleApiError(
|
||||||
error,
|
error,
|
||||||
"ChatController.sendMessage",
|
"ChatController.sendMessage",
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ export class NavigationManager {
|
|||||||
//初始化默认选的girl
|
//初始化默认选的girl
|
||||||
let cacheGirlId = sys.localStorage.getItem(this.LastSelectGirlID);
|
let cacheGirlId = sys.localStorage.getItem(this.LastSelectGirlID);
|
||||||
if (!cacheGirlId) {
|
if (!cacheGirlId) {
|
||||||
cacheGirlId = 10002;
|
cacheGirlId = 10016;
|
||||||
sys.localStorage.setItem(this.LastSelectGirlID, cacheGirlId);
|
sys.localStorage.setItem(this.LastSelectGirlID, cacheGirlId);
|
||||||
}
|
}
|
||||||
this._instance.selectedGirlId = Number(cacheGirlId);
|
this._instance.selectedGirlId = Number(cacheGirlId);
|
||||||
@@ -355,7 +355,6 @@ export class NavigationManager {
|
|||||||
`[NavigationManager] 无法确定basePanel类型: ${basePanel.name}`
|
`[NavigationManager] 无法确定basePanel类型: ${basePanel.name}`
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 存储动画配置
|
// 存储动画配置
|
||||||
this.subPanelAnimationConfigs.set(n, config);
|
this.subPanelAnimationConfigs.set(n, config);
|
||||||
|
|
||||||
@@ -466,6 +465,7 @@ export class NavigationManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const duration = config.duration || 0.3;
|
const duration = config.duration || 0.3;
|
||||||
|
//panel.active = false;
|
||||||
|
|
||||||
switch (config.openAnimation) {
|
switch (config.openAnimation) {
|
||||||
case PageTransitionType.SCALE:
|
case PageTransitionType.SCALE:
|
||||||
|
|||||||
@@ -92,6 +92,11 @@ export class ChatPanel extends li_BaseView implements IChatPanelCallback {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onLoadCT() {
|
onLoadCT() {
|
||||||
|
this.node.active = false;
|
||||||
|
this.scheduleOnce(() => {
|
||||||
|
this.node.active = true;
|
||||||
|
}, 0.1);
|
||||||
|
|
||||||
Utils.parseNode(this.node, this._nodeTab);
|
Utils.parseNode(this.node, this._nodeTab);
|
||||||
|
|
||||||
this.waitingAI = this._nodeTab.waitingAI;
|
this.waitingAI = this._nodeTab.waitingAI;
|
||||||
|
|||||||
@@ -28,6 +28,10 @@ export class GirlListPanel extends li_BaseView {
|
|||||||
category: number;
|
category: number;
|
||||||
|
|
||||||
onLoadCT() {
|
onLoadCT() {
|
||||||
|
this.node.active = false;
|
||||||
|
this.scheduleOnce(() => {
|
||||||
|
this.node.active = true;
|
||||||
|
}, 0.1);
|
||||||
Utils.parseNode(this.node, this._nodeTab);
|
Utils.parseNode(this.node, this._nodeTab);
|
||||||
this.registerListener();
|
this.registerListener();
|
||||||
this.itemInst = this._nodeTab.BubbleItem.getComponent(GirlListItem);
|
this.itemInst = this._nodeTab.BubbleItem.getComponent(GirlListItem);
|
||||||
|
|||||||
@@ -121,7 +121,6 @@ export class GirlListPopupPanel extends li_BaseView {
|
|||||||
this.close();
|
this.close();
|
||||||
TipsPanel.show("Buy Succeed");
|
TipsPanel.show("Buy Succeed");
|
||||||
} else {
|
} else {
|
||||||
//ViewManager.I.openBundlesView("PurchasePanel");
|
|
||||||
this.close();
|
this.close();
|
||||||
TipsPanel.show("Insufficient balance, need to purchase");
|
TipsPanel.show("Insufficient balance, need to purchase");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,7 +20,10 @@ import LanguageUtils, {
|
|||||||
LanguageType,
|
LanguageType,
|
||||||
} from "../../../Main/Common/LanguageUtils";
|
} from "../../../Main/Common/LanguageUtils";
|
||||||
import AudioManager from "../../../Main/Manager/AudioManager";
|
import AudioManager from "../../../Main/Manager/AudioManager";
|
||||||
import { NavigationManager } from "../../manager/NavigationManager";
|
import {
|
||||||
|
NavigationManager,
|
||||||
|
PageTransitionType,
|
||||||
|
} from "../../manager/NavigationManager";
|
||||||
import { PlayerDataService } from "../../network/services/PlayerDataService";
|
import { PlayerDataService } from "../../network/services/PlayerDataService";
|
||||||
import proto from "db://assets/Scripts/proto/proto.pb.js";
|
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);
|
NavigationManager.Instance.openSubPanel("SettingPanel", this.node);
|
||||||
}
|
}
|
||||||
private openPurchase() {
|
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;
|
web3BtnNotSelect;
|
||||||
|
|
||||||
onLoadCT(): void {
|
onLoadCT(): void {
|
||||||
|
this.node.active = false;
|
||||||
|
this.scheduleOnce(() => {
|
||||||
|
this.node.active = true;
|
||||||
|
}, 0.2);
|
||||||
|
|
||||||
Utils.parseNode(this.node, this._nodeTab);
|
Utils.parseNode(this.node, this._nodeTab);
|
||||||
this.coinNum = this._nodeTab.coinNum.getComponent(Label);
|
this.coinNum = this._nodeTab.coinNum.getComponent(Label);
|
||||||
this.vipLeftTime = this._nodeTab.vipText.getComponent(Label);
|
this.vipLeftTime = this._nodeTab.vipText.getComponent(Label);
|
||||||
|
|||||||
@@ -294,7 +294,10 @@ export class ThemePanel extends li_BaseView {
|
|||||||
}
|
}
|
||||||
|
|
||||||
enterShop() {
|
enterShop() {
|
||||||
NavigationManager.Instance.openSubPanel("PurchasePanel", this.node);
|
NavigationManager.Instance.openSubPanel("PurchasePanel", this.node, null, {
|
||||||
|
openAnimation: PageTransitionType.SLIDE_LEFT,
|
||||||
|
closeAnimation: PageTransitionType.SLIDE_RIGHT,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
chatWithRec() {
|
chatWithRec() {
|
||||||
|
|||||||
@@ -96,6 +96,14 @@ export class ThemeItem extends Component {
|
|||||||
this.category
|
this.category
|
||||||
);
|
);
|
||||||
NavigationManager.Instance.setSelectedCategoryId(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);
|
node.setPosition(screenWidth, 0, 0);
|
||||||
|
|
||||||
// 执行滑入动画到屏幕中心
|
// 执行滑入动画到屏幕中心
|
||||||
tween(node)
|
tween(node)
|
||||||
.to(
|
.to(
|
||||||
|
|||||||
@@ -1060,7 +1060,7 @@
|
|||||||
"_originalWidth": 0,
|
"_originalWidth": 0,
|
||||||
"_originalHeight": 64,
|
"_originalHeight": 64,
|
||||||
"_alignMode": 2,
|
"_alignMode": 2,
|
||||||
"_lockFlags": 12,
|
"_lockFlags": 4,
|
||||||
"_id": ""
|
"_id": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -163,7 +163,7 @@
|
|||||||
"_lpos": {
|
"_lpos": {
|
||||||
"__type__": "cc.Vec3",
|
"__type__": "cc.Vec3",
|
||||||
"x": 0,
|
"x": 0,
|
||||||
"y": -73.70000000000005,
|
"y": -81.85000000000002,
|
||||||
"z": 0
|
"z": 0
|
||||||
},
|
},
|
||||||
"_lrot": {
|
"_lrot": {
|
||||||
@@ -4358,7 +4358,7 @@
|
|||||||
"_contentSize": {
|
"_contentSize": {
|
||||||
"__type__": "cc.Size",
|
"__type__": "cc.Size",
|
||||||
"width": 1080,
|
"width": 1080,
|
||||||
"height": 1712
|
"height": 1695.6999999999998
|
||||||
},
|
},
|
||||||
"_anchorPoint": {
|
"_anchorPoint": {
|
||||||
"__type__": "cc.Vec2",
|
"__type__": "cc.Vec2",
|
||||||
@@ -4503,7 +4503,7 @@
|
|||||||
"_contentSize": {
|
"_contentSize": {
|
||||||
"__type__": "cc.Size",
|
"__type__": "cc.Size",
|
||||||
"width": 1080,
|
"width": 1080,
|
||||||
"height": 1712
|
"height": 1695.6999999999998
|
||||||
},
|
},
|
||||||
"_anchorPoint": {
|
"_anchorPoint": {
|
||||||
"__type__": "cc.Vec2",
|
"__type__": "cc.Vec2",
|
||||||
@@ -4656,7 +4656,7 @@
|
|||||||
"_contentSize": {
|
"_contentSize": {
|
||||||
"__type__": "cc.Size",
|
"__type__": "cc.Size",
|
||||||
"width": 1080,
|
"width": 1080,
|
||||||
"height": 1967.6
|
"height": 1951.3
|
||||||
},
|
},
|
||||||
"_anchorPoint": {
|
"_anchorPoint": {
|
||||||
"__type__": "cc.Vec2",
|
"__type__": "cc.Vec2",
|
||||||
@@ -4685,7 +4685,7 @@
|
|||||||
"_target": null,
|
"_target": null,
|
||||||
"_left": 0,
|
"_left": 0,
|
||||||
"_right": 0,
|
"_right": 0,
|
||||||
"_top": 147.4,
|
"_top": 163.7,
|
||||||
"_bottom": 0,
|
"_bottom": 0,
|
||||||
"_horizontalCenter": 0,
|
"_horizontalCenter": 0,
|
||||||
"_verticalCenter": 0,
|
"_verticalCenter": 0,
|
||||||
@@ -5637,7 +5637,7 @@
|
|||||||
"_originalWidth": 100,
|
"_originalWidth": 100,
|
||||||
"_originalHeight": 100,
|
"_originalHeight": 100,
|
||||||
"_alignMode": 2,
|
"_alignMode": 2,
|
||||||
"_lockFlags": 45,
|
"_lockFlags": 0,
|
||||||
"_id": ""
|
"_id": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
+1
-1
Submodule xchat_cfg updated: 84a1cc52c3...00e9816c33
Reference in New Issue
Block a user