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
+12 -1
View File
@@ -1,6 +1,7 @@
import { _decorator, Component, EditBox, Node } from "cc";
import { _decorator, Component, EditBox, Node,Label } from "cc";
import { DemoManager } from "./DemoManager";
import { ChatGPTService } from "./ChatGPTService";
import {characters} from "db://assets/Scripts/test/cfg/characters";
const { ccclass, property } = _decorator;
@ccclass("ChatPanel")
@@ -10,6 +11,16 @@ export class ChatPanel extends Component {
@property(EditBox)
editBox: EditBox = null;
@property(Label)
girlName: Label = null;
id:number
refresh(id:number) {
this.id = id;
const data = characters[id-1];
this.girlName.string = data.name;
}
protected onEnable(): void {
if (!this.manager) this.manager = DemoManager.getInstance();
}