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
+23 -4
View File
@@ -1,6 +1,9 @@
import { find } from "cc";
import { ChatContentsLayout } from "./ChatContentsLayout";
import { DemoData } from "./DemoData";
import {GirlDetailPanel} from "db://assets/Scripts/test/GirlDetailPanel";
import {ChatPanel} from "db://assets/Scripts/test/ChatPanel";
import {GirlListPanel} from "db://assets/Scripts/test/girlListPanel/GirlListPanel";
export class DemoManager {
private static _instance: DemoManager;
@@ -18,15 +21,31 @@ export class DemoManager {
demoData: DemoData;
public layoutout: ChatContentsLayout;
public detailPanel:GirlDetailPanel;
public chatPanel:ChatPanel;
public girlListPanel:GirlListPanel;
EnterChat(id: number) {
find("Canvas/ChatPanel").active = true;
find("Canvas/GirlDetailPanel").active = false;
if(this.chatPanel==null)
{
this.chatPanel = find("Canvas/ChatPanel").getComponent(ChatPanel);
}
this.chatPanel.node.active = true;
this.detailPanel.node.active = false;
}
EnterDetail(id: number) {
find("Canvas/GirlListPanel").active = false;
find("Canvas/GirlDetailPanel").active = true;
if(this.girlListPanel==null)
{
this.girlListPanel =find("Canvas/GirlListPanel").getComponent(GirlListPanel);
}
this.girlListPanel.node.active = false;
if(this.detailPanel==null)
{
this.detailPanel = find("Canvas/GirlDetailPanel").getComponent(GirlDetailPanel);
}
this.detailPanel.refresh(id);
this.detailPanel.node.active = true;
}
public updateDialog(isPlayer: boolean, str: string) {