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 -2
View File
@@ -1,5 +1,6 @@
import { _decorator, Component, Label, Node, Sprite } from "cc";
import { DemoManager } from "./DemoManager";
import {Character, characters} from "db://assets/Scripts/test/cfg/characters";
const { ccclass, property } = _decorator;
@ccclass("GirlDetailPanel")
@@ -14,8 +15,13 @@ export class GirlDetailPanel extends Component {
@property(Node)
chatBtn: Node;
id = 0;
start() {
this.id = 1;
refresh(index:number)
{
const data = characters[index-1];
this.girlName.string = data.name;
this.desc.string = data.description;
this.id = data.id;
}
OnClickChatBtn() {
DemoManager.getInstance().EnterChat(this.id);