This commit is contained in:
2025-09-17 18:51:08 +08:00
parent 7687a4f026
commit 020abb11dd
4 changed files with 30 additions and 25 deletions
@@ -184,9 +184,21 @@ export class GirlDetailPanel extends li_BaseView {
desc += tags[i];
}
this.tags.string = desc;
for (let i = 0; i < 5; i++) {
this.starParent.children[i].active = i < 5;
const star = girlData.getStar(this.category.toString(), this.id);
const stars = this.starParent.getComponentsInChildren(Sprite);
console.log("好感度:" + star);
for (let i = 0; i < stars.length; i++) {
const element = stars[i];
if (star > i) {
ResManager.I.changeResourceSpriteFrame(element, "ui/common/heart");
} else {
ResManager.I.changeResourceSpriteFrame(
element,
"ui/common/heart_empty"
);
}
}
let age = girlData.getGrilAge(this.category.toString(), this.id);
this.descAge.string =
LanguageUtils.getText("girldetailpanel.age") + age.toString();