update
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user