import SKLocalUtil from "../util/SKLocalUtil"; import SKLogger from "../util/SKLogger"; let EFFECT = { NORMAL: 0, SCALE: 1 }; class PopupManager { private static instance: PopupManager; public static getInstance(): PopupManager { if(!this.instance) this.instance = new PopupManager(); return this.instance; } private current: cc.Node = null; private dicts: any[]; constructor() { this.dicts = []; } showView(prefab: cc.Prefab, effcet: number = EFFECT.NORMAL,callBack:Function=null) { let node = cc.instantiate(prefab); let parent = cc.find("Canvas"); node.parent = parent; (callBack)&&(callBack(node)) this.current = node; let dict = { name: node.name, node: node, }; this.dicts.push(dict); } closeView(name: string, effcet: number = EFFECT.NORMAL) { let node = null; for(let i=0; i