{
  "code": "import { EventManager, StageMode } from \"../Tool/EventManager\";\r\nimport { ViewManager, ViewType } from \"../View/ViewManager\";\r\nimport { GameManager } from \"./GameManager\";\r\nimport { DropRule } from \"../Tool/DropRule\";\r\nexport class GameControl {\r\n    constructor() {\r\n        GameControl.ins = this;\r\n        this.Init();\r\n    }\r\n    static get Instance() {\r\n        if (GameControl.ins) {\r\n            return GameControl.ins;\r\n        }\r\n        else {\r\n            return new GameControl();\r\n        }\r\n    }\r\n    Init() {\r\n        EventManager.StageOn(StageMode.Start, this, this.GameStart);\r\n        EventManager.StageOn(StageMode.Lose, this, this.GameLose);\r\n        EventManager.StageOn(StageMode.Win, this, this.GameWin);\r\n    }\r\n    GameStart() {\r\n        ViewManager.Instance.ShowView(ViewType.InGameView);\r\n        DropRule.Instance.FallDown(DropRule.Instance.StartNum);\r\n    }\r\n    GameLose() {\r\n        if (GameManager.Instance.ReviveNum > 0) {\r\n            ViewManager.Instance.OpenPopView(ViewType.ReviveView);\r\n            GameManager.Instance.ReviveNum--;\r\n        }\r\n        else {\r\n            ViewManager.Instance.OpenPopView(ViewType.FailureView);\r\n        }\r\n    }\r\n    GameWin() {\r\n        ViewManager.Instance.OpenPopView(ViewType.WinView);\r\n    }\r\n}\r\n//# sourceMappingURL=GameControl.js.map",
  "references": [
    "E:/LayaProject/2048_laya/src/Tool/EventManager.ts",
    "E:/LayaProject/2048_laya/src/View/ViewManager.ts",
    "E:/LayaProject/2048_laya/src/Main/GameManager.ts",
    "E:/LayaProject/2048_laya/src/Tool/GamePool.ts",
    "E:/LayaProject/2048_laya/src/Tool/DropRule.ts"
  ],
  "map": "{\"version\":3,\"file\":\"GameControl.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../src/Main/GameControl.ts\"],\"names\":[],\"mappings\":\"AAAA,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;A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