{
  "code": "import MainGameView from \"./MainGameView\";\r\nimport InGameView from \"./InGameView\";\r\nexport var ViewType;\r\n(function (ViewType) {\r\n    ViewType[ViewType[\"MainView\"] = 0] = \"MainView\";\r\n    ViewType[ViewType[\"IngameView\"] = 1] = \"IngameView\";\r\n})(ViewType || (ViewType = {}));\r\n;\r\nexport class ViewManager {\r\n    constructor() {\r\n        this.showexportview = 0;\r\n        this.popViewDic = [];\r\n        this.ViewSprite = new Laya.Sprite();\r\n        this.OtherViewSprite = new Laya.Sprite();\r\n        ViewManager.ins = this;\r\n        Laya.stage.addChild(this.ViewSprite);\r\n        Laya.stage.addChild(this.OtherViewSprite);\r\n    }\r\n    static get Instance() {\r\n        if (ViewManager.ins) {\r\n            return ViewManager.ins;\r\n        }\r\n        else {\r\n            return new ViewManager();\r\n        }\r\n    }\r\n    ShowView(_viewtype, data = null) {\r\n        if (this.curView != null) {\r\n            this.curView.Close();\r\n            this.curView.destroy();\r\n            this.curView.removeSelf();\r\n        }\r\n        this.curView = this.CreateView(_viewtype);\r\n        this.curView.name = ViewType[_viewtype];\r\n        this.ViewSprite.addChild(this.curView);\r\n        this.curView.Show(data);\r\n    }\r\n    CloseView() {\r\n        if (this.curView != null) {\r\n            this.curView.Close();\r\n            this.curView.destroy();\r\n            this.curView.removeSelf();\r\n        }\r\n    }\r\n    OpenPopView(viewType, data = null) {\r\n        var popView;\r\n        if (this.popViewDic[viewType]) {\r\n            popView = this.popViewDic[viewType];\r\n            this.OtherViewSprite.setChildIndex(popView, this.OtherViewSprite.numChildren - 1);\r\n            popView.visible = true;\r\n        }\r\n        else {\r\n            popView = this.CreateView(viewType);\r\n            this.OtherViewSprite.addChild(popView);\r\n            this.popViewDic[viewType] = popView;\r\n        }\r\n        this.showexportview = 1;\r\n        popView.OnOpen(data);\r\n    }\r\n    ClosePopView(viewType) {\r\n        var popView = this.popViewDic[viewType];\r\n        if (popView == null) {\r\n            return;\r\n        }\r\n        popView.OnHide();\r\n        popView.visible = false;\r\n        this.showexportview = 0;\r\n    }\r\n    ClearPopViews() {\r\n    }\r\n    CreateView(_viewtype) {\r\n        switch (_viewtype) {\r\n            case ViewType.MainView:\r\n                return new MainGameView();\r\n            case ViewType.IngameView:\r\n                return new InGameView();\r\n        }\r\n        return null;\r\n    }\r\n}\r\n//# sourceMappingURL=ViewManager.js.map",
  "references": [
    "E:/LayaProject/ArcherWorrior/src/View/MainGameView.ts",
    "E:/LayaProject/ArcherWorrior/src/View/InGameView.ts"
  ],
  "map": "{\"version\":3,\"file\":\"ViewManager.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../src/View/ViewManager.ts\"],\"names\":[],\"mappings\":\"AAAA,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAC1C,OAAO,UAAU,MAAM,cAAc,CAAC;AAEtC,MAAM,CAAN,IAAY,QAA6B;AAAzC,WAAY,QAAQ;IAAC,+CAAQ,CAAA;IAAC,mDAAU,CAAA;AAAA,CAAC,EAA7B,QAAQ,KAAR,QAAQ,QAAqB;AAAA,CAAC;AAM1C,MAAM,OAAO,WAAW;IAQpB;QANO,mBAAc,GAAU,CAAC,CAAC;QAEzB,eAAU,GAAc,EAAE,CAAC;QAC5B,eAAU,GAAe,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;QAC3C,oBAAe,GAAe,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;QAGnD,WAAW,CAAC,GAAG,GAAG,IAAI,CAAC;QACvB,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QACrC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;IAC9C,CAAC;IACM,MAAM,KAAK,QAAQ;QACtB,IAAG,WAAW,CAAC,GAAG,EAAC;YACf,OAAO,WAAW,CAAC,GAAG,CAAA;SACzB;aACG;YACA,OAAO,IAAI,WAAW,EAAE,CAAC;SAC5B;IACL,CAAC;IACD,QAAQ,CAAC,SAAkB,EAAC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