update
This commit is contained in:
@@ -96,7 +96,7 @@ export class LoginUI extends li_BaseView {
|
||||
const globalData = DataManager.I.getDataById<GlobalData>(DataId.Global);
|
||||
globalData.globals = res.data;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private enterGame() {
|
||||
ResManager.I.goMainScene();
|
||||
|
||||
@@ -525,9 +525,10 @@ export class ChatModel {
|
||||
//return false;
|
||||
const girlData = DataManager.I.getDataById<GirlData>(DataId.Girl);
|
||||
const roleData = this.rolesData.get(this.currentGirlId);
|
||||
|
||||
return (
|
||||
girlData.getChatRemainCount(roleData.categoryId, roleData.girlId) > 0
|
||||
const leftTime = girlData.getChatRemainCount(
|
||||
roleData.categoryId,
|
||||
roleData.girlId
|
||||
);
|
||||
return leftTime === 0 ? false : true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -141,22 +141,14 @@ export class GirlListItem extends Component {
|
||||
const envData = DataManager.I.getDataById<EnvData>(DataId.Env);
|
||||
let newPath = envData.cdn + "/" + "Girls/" + avatarPath + ".png";
|
||||
//listAvatarPath = listAvatarPath.replace("Avatar", "avatar"); //临时
|
||||
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;
|
||||
}
|
||||
);
|
||||
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;
|
||||
});
|
||||
|
||||
const star = girlData.getStar(this.category.toString(), this.id);
|
||||
|
||||
console.log("好感度:" + star);
|
||||
for (let i = 0; i < this.stars.length; i++) {
|
||||
const element = this.stars[i];
|
||||
if (star > i) {
|
||||
@@ -182,28 +174,28 @@ export class GirlListItem extends Component {
|
||||
this.nameKey = "";
|
||||
this.tagKey = "";
|
||||
this.baseNode = null;
|
||||
|
||||
|
||||
// 重置UI状态
|
||||
this.node.active = false;
|
||||
this.loading.active = false;
|
||||
|
||||
|
||||
// 清理文本内容
|
||||
if (this.girlName) this.girlName.string = "";
|
||||
if (this.tags) this.tags.string = "";
|
||||
if (this.price) this.price.string = "";
|
||||
|
||||
|
||||
// 重置可见性状态
|
||||
if (this.price?.node) this.price.node.active = false;
|
||||
if (this.freeNode) this.freeNode.active = false;
|
||||
if (this.starParent) this.starParent.active = false;
|
||||
if (this.chatIcon) this.chatIcon.active = false;
|
||||
if (this.unreleaseCover) this.unreleaseCover.active = false;
|
||||
|
||||
|
||||
// 清理头像
|
||||
if (this.avatar) {
|
||||
this.avatar.spriteFrame = null;
|
||||
}
|
||||
|
||||
|
||||
// 清理星级显示
|
||||
if (this.stars) {
|
||||
for (let star of this.stars) {
|
||||
|
||||
Reference in New Issue
Block a user