GirlList缓存池
This commit is contained in:
@@ -174,6 +174,42 @@ export class GirlListItem extends Component {
|
||||
}
|
||||
}
|
||||
|
||||
reset() {
|
||||
this.id = -1;
|
||||
this.category = 0;
|
||||
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) {
|
||||
star.spriteFrame = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
onClickDetail() {
|
||||
const girlData = DataManager.I.getDataById<GirlData>(DataId.Girl);
|
||||
// 是否已经解锁
|
||||
|
||||
Reference in New Issue
Block a user