update
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
import { _decorator, Component, Node } from "cc";
|
||||
import { DemoData, Dialog } from "./DemoData";
|
||||
import { ChatContentsLayout } from "./ChatContentsLayout";
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass("DemoManager")
|
||||
export class DemoManager extends Component {
|
||||
demoData: DemoData;
|
||||
|
||||
public layoutout: ChatContentsLayout;
|
||||
|
||||
start() {
|
||||
this.demoData = new DemoData();
|
||||
}
|
||||
|
||||
public updateDialog(isPlayer: boolean, str: string) {
|
||||
this.demoData.pushDialog(isPlayer, str);
|
||||
console.log("update dialog");
|
||||
this.layoutout.UpdateDialog(this.getDialogs());
|
||||
}
|
||||
|
||||
public getDialogs() {
|
||||
return this.demoData.GetDialogs();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user