update
This commit is contained in:
@@ -4,6 +4,9 @@ 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";
|
||||
import {ViewManager} from "db://assets/Scripts/Main/Manager/ViewManager";
|
||||
import Utils from "db://assets/Scripts/Main/Common/Utils";
|
||||
import {InnerMsgCode} from "db://assets/Scripts/Main/Config/InnerMsgCode";
|
||||
|
||||
export class DemoManager {
|
||||
private static _instance: DemoManager;
|
||||
@@ -20,38 +23,26 @@ export class DemoManager {
|
||||
|
||||
demoData: DemoData;
|
||||
|
||||
public layoutout: ChatContentsLayout;
|
||||
public detailPanel:GirlDetailPanel;
|
||||
public chatPanel:ChatPanel;
|
||||
public girlListPanel:GirlListPanel;
|
||||
|
||||
hideMainView()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
EnterChat(id: number) {
|
||||
if(this.chatPanel==null)
|
||||
{
|
||||
this.chatPanel = find("Canvas/ChatPanel").getComponent(ChatPanel);
|
||||
}
|
||||
this.chatPanel.node.active = true;
|
||||
this.detailPanel.node.active = false;
|
||||
ViewManager.I.openBundlesView("ChatPanel",id);
|
||||
|
||||
}
|
||||
|
||||
EnterDetail(id: number) {
|
||||
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;
|
||||
ViewManager.I.openBundlesView("GirlDetailPanel",id);
|
||||
}
|
||||
|
||||
public updateDialog(isPlayer: boolean, str: string) {
|
||||
public updateDialog(isPlayer: boolean, str: string,fromPlayer:boolean = false) {
|
||||
if(fromPlayer){this.demoData.cleanDialog()}
|
||||
this.demoData.pushDialog(isPlayer, str);
|
||||
console.log("update dialog");
|
||||
this.layoutout.UpdateDialog(this.getDialogs());
|
||||
Utils.sendInnerMsg(InnerMsgCode.Chat_DialogRefresh);
|
||||
}
|
||||
|
||||
public getDialogs() {
|
||||
|
||||
Reference in New Issue
Block a user