import { ryw_Event } from "../../FrameWork/Event/EventEnum"; import EventMgr from "../../FrameWork/Event/EventMgr"; export class ViewConfig { public viewName: string; public url: string; public bundle: string; public isLoading: boolean = false; public viewnode: cc.Node; public data: any = {}; public stackIndex: number = 0; public pNode:cc.Node; public dadianTag = '' public wanJiaDaDianTag = "" public isShowLoading = false constructor(url: string, bundle?: string, dadianTag?: string, wanJiaDaDianTag?: string, isShowLoading?:boolean) { this.url = url; this.bundle = bundle; this.viewName = url.substr(url.lastIndexOf('/') + 1); if(isShowLoading == false){ isShowLoading = false }else{ isShowLoading = true } this.isShowLoading = isShowLoading this.dadianTag = dadianTag this.wanJiaDaDianTag = wanJiaDaDianTag } public get node(): cc.Node { return this.viewnode; } public set node(v: cc.Node) { this.viewnode = v; console.log("预制加载完成 ", this.node.name); // GlobalEventManager.getInstance().emit("viewLoadEnd", this.node) EventMgr.emitEvent_custom(ryw_Event.viewLoadEnd, this.node) } }