This commit is contained in:
2025-09-22 19:59:38 +08:00
parent 738e64acb5
commit ac727831ff
3 changed files with 28 additions and 7 deletions
@@ -78,7 +78,25 @@ export class PastGirlListItem extends Component {
);
}
refreshData(girlId: number, baseNode: Node): number {
refreshSimple() {
// 显示星级(好感度)
const girlData = DataManager.I.getDataById<GirlData>(DataId.Girl);
const star = girlData.getStar(this.category.toString(), this.id);
for (let i = 0; i < this.stars.length; i++) {
const element = this.stars[i];
if (star > i) {
ResManager.I.changeResourceSpriteFrame(element, "ui/common/heart");
} else {
ResManager.I.changeResourceSpriteFrame(
element,
"ui/common/heart_empty"
);
}
}
this.updateLastChatTime();
}
refreshData(girlId: number, baseNode: Node) {
if (!this.stars) {
this.stars = this.starParent.getComponentsInChildren(Sprite);
}
@@ -148,7 +166,7 @@ export class PastGirlListItem extends Component {
}, 0);
// 显示最近聊天时间
return this.updateLastChatTime();
this.updateLastChatTime();
}
private getLastChatTime(id: number): number | null {