This commit is contained in:
2025-07-25 15:20:02 +08:00
parent 2f6d583ebf
commit 1dba986ad7
26 changed files with 1989 additions and 759 deletions
@@ -8,6 +8,7 @@ import {
Sprite,
} from "cc";
import { DemoManager } from "../DemoManager";
import { Character, characters } from "db://assets/Scripts/test/cfg/characters";
const { ccclass, property } = _decorator;
@ccclass("GirlListItem")
@@ -24,19 +25,17 @@ export class GirlListItem extends Component {
chatBtn: Node;
id: number = -1;
start() {
// this.avatar = this.node
// .getChildByName("avatar/Avatar")
// .getComponent(Sprite);
// this.girlName = this.node.getChildByName("Desc/Name").getComponent(Label);
// this.desc = this.node.getChildByName("Desc/desc").getComponent(Label);
// this.price = this.node.getChildByName("purchase/price").getComponent(Label);
// this.chatBtn = this.node.getChildByName("purchase/Button");
this.id = 1;
protected onEnable(): void {
this.refreshData(1);
}
refreshData() {}
refreshData(index: number) {
const data = characters[index - 1];
this.id = data.id;
this.girlName.string = data.name;
//this.avatar.spriteFrame =
}
onClickDetail() {
DemoManager.getInstance().EnterDetail(this.id);