This commit is contained in:
2025-07-22 16:43:10 +08:00
parent a90dce06f3
commit 52bae0735f
36 changed files with 10224 additions and 1658 deletions
+23 -7
View File
@@ -1,16 +1,32 @@
import { _decorator, Component, Node } from "cc";
import { DemoData, Dialog } from "./DemoData";
import { find } from "cc";
import { ChatContentsLayout } from "./ChatContentsLayout";
const { ccclass, property } = _decorator;
import { DemoData } from "./DemoData";
export class DemoManager {
private static _instance: DemoManager;
public static getInstance() {
if (!this._instance) {
this._instance = new DemoManager();
}
return this._instance;
}
private constructor() {
this.demoData = new DemoData();
}
@ccclass("DemoManager")
export class DemoManager extends Component {
demoData: DemoData;
public layoutout: ChatContentsLayout;
start() {
this.demoData = new DemoData();
EnterChat(id: number) {
find("Canvas/ChatPanel").active = true;
find("Canvas/GirlDetailPanel").active = false;
}
EnterDetail(id: number) {
find("Canvas/GirlListPanel").active = false;
find("Canvas/GirlDetailPanel").active = true;
}
public updateDialog(isPlayer: boolean, str: string) {