{
  "code": "import { PlayerManager } from \"./PlayerManager\";\r\nimport { DispatcherManager, StageState } from \"../GameUtils/EventManager\";\r\nimport WallBehav from \"../Game/WallBehav\";\r\nimport { ViewManager, ViewType } from \"../View/ViewManager\";\r\nimport { MateMove } from \"../Game/MateMove\";\r\nimport { CameraManager } from \"./CameraManager\";\r\nexport class LevelManager {\r\n    constructor() {\r\n        LevelManager.ins = this;\r\n    }\r\n    static get Instance() {\r\n        if (LevelManager.ins == null) {\r\n            return new LevelManager();\r\n        }\r\n        return LevelManager.ins;\r\n    }\r\n    RegEvent() {\r\n        DispatcherManager.StageOn(StageState.Lose, this, this.GameLose);\r\n        DispatcherManager.StageOn(StageState.Win, this, this.GameWin);\r\n        DispatcherManager.StageOn(StageState.Pause, this, this.GamePause);\r\n        DispatcherManager.StageOn(StageState.Resume, this, this.GameResume);\r\n        DispatcherManager.StageOn(StageState.Over, this, this.GameStart);\r\n    }\r\n    GameStart() {\r\n        PlayerManager.Instance.Init();\r\n        CameraManager.Instance.Init();\r\n        ViewManager.Instance.ShowView(ViewType.HomeView);\r\n    }\r\n    GameLose() {\r\n        PlayerManager.Instance.ListenOff();\r\n        Laya.timer.once(500, this, () => {\r\n            ViewManager.Instance.ShowView(ViewType.GameResultView, false);\r\n        });\r\n    }\r\n    GameWin() {\r\n        PlayerManager.Instance.ListenOff();\r\n        Laya.timer.once(500, this, () => {\r\n            ViewManager.Instance.ShowView(ViewType.GameResultView, true);\r\n        });\r\n    }\r\n    GamePause() {\r\n    }\r\n    GameResume() {\r\n    }\r\n    BackMain() {\r\n        for (let i = this.spritepool.numChildren - 1; i >= 0; i--) {\r\n            let child = this.spritepool.getChildAt(i);\r\n            let _well = child.getComponent(WallBehav);\r\n            if (_well) {\r\n                _well.destroy();\r\n            }\r\n            let _matemove = child.getComponent(MateMove);\r\n            if (_matemove) {\r\n                _matemove.destroy();\r\n            }\r\n            child.removeSelf();\r\n            child.destroy();\r\n            child = null;\r\n        }\r\n    }\r\n}\r\n//# sourceMappingURL=LevelManager.js.map",
  "references": [
    "E:/LayaProject/DanceLine/RubikCube/src/Manager/PlayerManager.ts",
    "E:/LayaProject/DanceLine/RubikCube/src/GameUtils/EventManager.ts",
    "E:/LayaProject/DanceLine/RubikCube/src/Game/WallBehav.ts",
    "E:/LayaProject/DanceLine/RubikCube/src/View/ViewManager.ts",
    "E:/LayaProject/DanceLine/RubikCube/src/Game/MateMove.ts",
    "E:/LayaProject/DanceLine/RubikCube/src/Manager/CameraManager.ts"
  ],
  "map": "{\"version\":3,\"file\":\"LevelManager.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../src/Manager/LevelManager.ts\"],\"names\":[],\"mappings\":\"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAC1E,OAAO,SAAS,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,MAAM,OAAO,YAAY;IAErB;QACI,YAAY,CAAC,GAAG,GAAG,IAAI,CAAC;IAC5B,CAAC;IACM,MAAM,KAAK,QAAQ;QACtB,IAAG,YAAY,CAAC,GAAG,IAAI,IAAI,EAAC;YACxB,OAAO,IAAI,YAAY,EAAE,CAAC;SAC7B;QACD,OAAO,YAAY,CAAC,GAAG,CAAC;IAC5B,CAAC;IAGD,QAAQ;QACJ,iBAAiB,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,EAAC,IAAI,EAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC9D,iBAAiB,CAAC,OAAO,CAAC,UAAU,CAAC,GAAG,EAAC,IAAI,EAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC5D,iBAAiB,CAAC,OAAO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