This commit is contained in:
2025-10-10 16:09:14 +08:00
parent 561b3c5eee
commit df9ca6bfaa
66 changed files with 7433 additions and 7779 deletions
@@ -28,16 +28,6 @@ export class PastGirlListItem extends Component {
@property(Node)
starParent: Node;
@property(Node)
freeTag: Node;
@property(UITransform)
categoryBg: UITransform;
@property(Label)
categoryTxt: Label;
@property(Node)
loading: Node;
stars: Sprite[];
id: number = -1;
@@ -108,10 +98,6 @@ export class PastGirlListItem extends Component {
this.girlName.string = LanguageUtils.getText(this.nameKey);
this.tagKey = girlData.getGrilTagKey(this.category.toString(), this.id);
this.freeTag.active = girlData.isGirlFreeType(
this.category.toString(),
this.id
);
// 标签显示
let desc = "";
const tags = LanguageUtils.getText(this.tagKey).split("|");
@@ -126,14 +112,12 @@ export class PastGirlListItem extends Component {
// 加载头像
let avatarPath = girlData.getGrilAvatar(this.category.toString(), this.id);
this.loading.active = true;
const envData = DataManager.I.getDataById<EnvData>(DataId.Env);
let newPath = envData.cdn + "/" + "Girls/" + avatarPath + ".png";
ResManager.I.changeRemoteSpriteFrame(this.avatar, newPath, () => {
let sizeTran = this.avatar.node.parent.getComponent(UITransform);
Utils.adjustBgPixelRatioToSize(sizeTran.contentSize, this.avatar.node, 2);
this.loading.active = false;
});
// 显示星级(好感度)
@@ -153,14 +137,6 @@ export class PastGirlListItem extends Component {
const themeData = DataManager.I.getDataById<ThemeData>(DataId.Theme);
const cat = girlData.getGrilCategoryById(this.id);
let key = themeData.getLanKeyById(1001 + cat);
this.categoryTxt.string = LanguageUtils.getText(key);
this.scheduleOnce(() => {
const size = this.categoryTxt.getComponent(UITransform).contentSize;
this.categoryBg.setContentSize(
size.x + 60,
this.categoryBg.contentSize.y
);
}, 0);
// 显示最近聊天时间
this.updateLastChatTime();
@@ -190,7 +166,6 @@ export class PastGirlListItem extends Component {
// 重置UI状态
this.node.active = false;
this.loading.active = false;
// 清理文本内容
if (this.girlName) this.girlName.string = "";