This commit is contained in:
2025-09-22 14:13:18 +08:00
parent ec35bf4e87
commit 26019a0080
5 changed files with 298 additions and 97 deletions
@@ -242,29 +242,12 @@ export class GirlDetailPanel extends li_BaseView {
: new Size(600, 800);
// 获取 videoArea 的中心位置,确保使用正确的世界坐标
const videoAreaPos = this.videoAreaPos;
if (this.videoArea) {
// 获取 videoArea 的世界坐标
this.videoAreaPos = this.videoArea.node.getWorldPosition();
// 也检查 videoLayer 的父节点信息,确保坐标系统一致
if (this.videoLayer && this.videoLayer.getVideoPlayer()) {
const videoPlayerParent =
this.videoLayer.getVideoPlayer().node.parent;
if (videoPlayerParent) {
const parentWorldPos = videoPlayerParent.getWorldPosition();
logger.log(
`GirlDetailPanel: VideoPlayer 父节点世界位置: (${parentWorldPos.x}, ${parentWorldPos.y}, ${parentWorldPos.z})`
);
}
}
}
// 使用新的统一 playVideo 方法
this.videoLayer.playVideo(firstPath, {
loop: true,
size: targetSize,
position: videoAreaPos,
position: this.videoAreaPos,
});
}
@@ -1,4 +1,4 @@
import { _decorator, Component, Label, Node } from "cc";
import { _decorator, Component, Label, Node, ScrollView } from "cc";
import li_BaseView from "../../../Main/Common/li_BaseView";
import Utils from "../../../Main/Common/Utils";
import { GButton } from "../../../Main/Common/GButton";
@@ -29,6 +29,8 @@ export class PurchasePanel extends li_BaseView {
private vipPrice30: Label;
private vipTime30: Label;
private ScrollView: ScrollView;
private currentPayType: proto.cs.EnmPayType =
proto.cs.EnmPayType.EPT_Cash_INR;
private defaultNetworkType: proto.cs.EnmNetworkType =
@@ -59,6 +61,8 @@ export class PurchasePanel extends li_BaseView {
this.vipPrice30 = this._nodeTab.vipPrice30.getComponent(Label);
this.vipTime30 = this._nodeTab.vipTime30.getComponent(Label);
this.ScrollView = this._nodeTab.ScrollView.getComponent(ScrollView);
this.cashBtnSelecting = this._nodeTab.cashBtn.getChildByName("selecting");
this.cashBtnNotSelect = this._nodeTab.cashBtn.getChildByName("notSelect");
this.web3BtnSelecting = this._nodeTab.web3Btn.getChildByName("selecting");
@@ -159,6 +163,7 @@ export class PurchasePanel extends li_BaseView {
const memberId30 = this.shopData.get30DayMemberId();
const price30 = this.shopData.getOriginalPriceById(memberId30);
this.vipPrice30.string = `$ ${price30}`;
this.ScrollView.scrollToBottom();
}
// 0:cash 1:web3