This commit is contained in:
2025-10-11 14:59:05 +08:00
parent b746a8101e
commit 2c9fe99b14
32 changed files with 5011 additions and 11834 deletions
+24
View File
@@ -72,6 +72,9 @@ export class PreloadUI extends Component {
private appVersion: Label;
private progressNode: Node;
private loginLabel: Label;
private desc: Label;
start() {
//Utils.addInnerEL(InnerMsgCode.UI_ShowPrompt, this, this.resiveShowPrompt)
Utils.parseNode(this.node, this._nodeTab);
@@ -84,6 +87,9 @@ export class PreloadUI extends Component {
this.appVersion.string = `app version: ${prodConfig.appVersion}`;
this.VideoPlayer = this._nodeTab.VideoPlayer.getComponent(VideoPlayer);
this.loginLabel = this._nodeTab.loginLabel.getComponent(Label);
this.desc = this._nodeTab.Desc.getComponent(Label);
this.VideoPlayer.node.on(
VideoPlayer.EventType.META_LOADED,
this.onVideoReadyToPlay,
@@ -105,6 +111,24 @@ export class PreloadUI extends Component {
if (!this.VideoPlayer.isPlaying) this.VideoPlayer.play();
//初始化显示
switch (LanguageUtils.CurrentLanguage) {
case LanguageType.CN:
this.loginLabel.string = "登录";
this.desc.string = "释放你的所有欲望";
break;
case LanguageType.EN:
this.loginLabel.string = "LOG IN";
this.desc.string = "Unleash All Your Desires";
break;
case LanguageType.HI:
this.loginLabel.string = "लॉग इन";
this.desc.string = "अपनी सारी इच्छाओं को मुक्त करें";
break;
default:
break;
}
// 初始化配置
ConfigManager.I.init();
//logger.log(ConfigManager.tables.TbGlobalConfig.GameName);
@@ -15,6 +15,7 @@ import { DataId, DataManager } from "../../data/DataManager";
import { NavigationManager } from "../../manager/NavigationManager";
import ResManager from "../../../Main/Manager/ResManager";
import { EnvData } from "../../data/EnvData";
import { WalletData } from "../../data/WalletData";
const { ccclass, property } = _decorator;
@ccclass("DialogBubble")
@@ -28,6 +29,9 @@ export class DialogBubble extends Component {
@property(UITransform)
contentT: UITransform = null;
@property(Node)
vipFrame: Node = null;
fixMaxWidth: number;
uiTransform: UITransform;
@@ -54,8 +58,13 @@ export class DialogBubble extends Component {
this.content.overflow = Overflow.NONE;
let isVip = false;
//设置头像
if (isPlayer) {
const walletData = DataManager.I.getDataById<WalletData>(DataId.Wallet);
isVip = walletData.isVip;
//获取玩家头像,等接入luffa
} else {
const girlData = DataManager.I.getDataById<GirlData>(DataId.Girl);
@@ -85,6 +94,7 @@ export class DialogBubble extends Component {
}
return;
}
if (this.vipFrame) this.vipFrame.active = isVip;
// 设置文本内容
this.content.string = str;
@@ -219,11 +219,14 @@ export class GirlDetailPanel extends li_BaseView {
for (let i = 0; i < stars.length; i++) {
const element = stars[i];
if (star > i) {
ResManager.I.changeResourceSpriteFrame(element, "ui/common/heart");
ResManager.I.changeResourceSpriteFrame(
element,
"ui/common/heart/heart"
);
} else {
ResManager.I.changeResourceSpriteFrame(
element,
"ui/common/heart_empty"
"ui/common/heart/heart_empty"
);
}
}
@@ -1,4 +1,12 @@
import { _decorator, Component, Node, instantiate, tween, Vec3 } from "cc";
import {
_decorator,
Component,
Node,
instantiate,
tween,
Vec3,
Label,
} 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";
@@ -8,6 +16,8 @@ import { DataManager, DataId } from "../../data/DataManager";
import { GirlData } from "../../data/GirlData";
import proto from "db://assets/Scripts/proto/proto.pb.js";
import { NavigationManager, PanelType } from "../../manager/NavigationManager";
import { ThemeData } from "../../data/ThemeData";
import LanguageUtils from "../../../Main/Common/LanguageUtils";
const { ccclass, property } = _decorator;
@@ -24,6 +34,9 @@ export class GirlListPanel extends li_BaseView {
private itemPool: GirlListItem[] = [];
private maxPoolSize: number = 20;
private title1: Label;
private title2: Label;
category: number;
onLoadCT() {
@@ -36,6 +49,10 @@ export class GirlListPanel extends li_BaseView {
this.itemInst = this._nodeTab.BubbleItem.getComponent(GirlListItem);
this.itemInst.node.active = false;
this.content = this._nodeTab.content;
this.title1 = this._nodeTab.title1.getComponent(Label);
this.title2 = this._nodeTab.title2.getComponent(Label);
this.refresh();
}
@@ -90,6 +107,11 @@ export class GirlListPanel extends li_BaseView {
this.cache = [];
}
// 主题数据
const themeData = DataManager.I.getDataById<ThemeData>(DataId.Theme);
const key = themeData.getLanKeyById(1001 + category);
this.title1.string = this.title2.string = LanguageUtils.getText(key);
// 请求列表
const reqData = {
category,
+12 -11
View File
@@ -92,15 +92,13 @@ export class GirlListItem extends Component {
this.nameKey = girlData.getGrilName(this.category.toString(), this.id);
this.girlName.string = LanguageUtils.getText(this.nameKey);
this.tagKey = girlData.getGrilTagKey(this.category.toString(), this.id);
// 是否已经解锁
const isRelease = girlData.getIsRelease(this.category.toString(), this.id);
let desc = "";
const tags = LanguageUtils.getText(this.tagKey).split("|");
for (let i = 0; i < tags.length; i++) {
if (i != 0) desc += "|";
desc += tags[i];
}
this.tags.string = desc;
// let desc = "";
// const tags = LanguageUtils.getText(this.tagKey).split("|");
// for (let i = 0; i < tags.length; i++) {
// if (i != 0) desc += "|";
// desc += tags[i];
// }
this.tags.string = LanguageUtils.getText(this.tagKey);
let priceType = girlData.getGrilPriceType(
this.category.toString(),
this.id
@@ -126,11 +124,14 @@ export class GirlListItem extends Component {
for (let i = 0; i < this.stars.length; i++) {
const element = this.stars[i];
if (star > i) {
ResManager.I.changeResourceSpriteFrame(element, "ui/common/heart");
ResManager.I.changeResourceSpriteFrame(
element,
"ui/common/heart/heart"
);
} else {
ResManager.I.changeResourceSpriteFrame(
element,
"ui/common/heart_empty"
"ui/common/heart/heart_empty"
);
}
}
@@ -73,11 +73,14 @@ export class PastGirlListItem extends Component {
for (let i = 0; i < this.stars.length; i++) {
const element = this.stars[i];
if (star > i) {
ResManager.I.changeResourceSpriteFrame(element, "ui/common/heart");
ResManager.I.changeResourceSpriteFrame(
element,
"ui/common/heart/heart"
);
} else {
ResManager.I.changeResourceSpriteFrame(
element,
"ui/common/heart_empty"
"ui/common/heart/heart_empty"
);
}
}
@@ -99,13 +102,13 @@ export class PastGirlListItem extends Component {
this.tagKey = girlData.getGrilTagKey(this.category.toString(), this.id);
// 标签显示
let desc = "";
const tags = LanguageUtils.getText(this.tagKey).split("|");
for (let i = 0; i < tags.length; i++) {
if (i != 0) desc += "|";
desc += tags[i];
}
this.tags.string = desc;
// let desc = "";
// const tags = LanguageUtils.getText(this.tagKey).split("|");
// for (let i = 0; i < tags.length; i++) {
// if (i != 0) desc += "|";
// desc += tags[i];
// }
this.tags.string = LanguageUtils.getText(this.tagKey);
// 由于都是已解锁的,直接显示聊天图标
this.starParent.active = true;
@@ -125,11 +128,14 @@ export class PastGirlListItem extends Component {
for (let i = 0; i < this.stars.length; i++) {
const element = this.stars[i];
if (star > i) {
ResManager.I.changeResourceSpriteFrame(element, "ui/common/heart");
ResManager.I.changeResourceSpriteFrame(
element,
"ui/common/heart/heart"
);
} else {
ResManager.I.changeResourceSpriteFrame(
element,
"ui/common/heart_empty"
"ui/common/heart/heart_empty"
);
}
}
@@ -64,9 +64,15 @@ export class RecomandItem extends Component {
for (let i = 0; i < this.hearts.length; i++) {
const element = this.hearts[i];
if (starCount > i) {
ResManager.I.changeResourceSpriteFrame(element, "ui/common/ZY_UI_AX1");
ResManager.I.changeResourceSpriteFrame(
element,
"ui/common/heart/heart"
);
} else {
ResManager.I.changeResourceSpriteFrame(element, "ui/common/ZY_UI_AX2");
ResManager.I.changeResourceSpriteFrame(
element,
"ui/common/heart/heart_empty"
);
}
}