4dbf16ecd67d7abc19c0b0713abb92415c441f2d 1.8 KB

123456789
  1. {
  2. "code": "import GameConfig from \"./GameConfig\";\r\nimport { LoadView } from \"./View/LoadView\";\r\nimport { CheckMain } from \"./Tools/CheckMain\";\r\nclass Main {\r\n constructor() {\r\n if (CheckMain.Create)\r\n return;\r\n CheckMain.Create = true;\r\n if (window[\"Laya3D\"])\r\n Laya3D.init(GameConfig.width, GameConfig.height);\r\n else\r\n Laya.init(GameConfig.width, GameConfig.height, Laya[\"WebGL\"]);\r\n Laya[\"Physics\"] && Laya[\"Physics\"].enable();\r\n Laya[\"DebugPanel\"] && Laya[\"DebugPanel\"].enable();\r\n Laya.stage.scaleMode = GameConfig.scaleMode;\r\n Laya.stage.screenMode = GameConfig.screenMode;\r\n Laya.stage.alignV = GameConfig.alignV;\r\n Laya.stage.alignH = GameConfig.alignH;\r\n Laya.URL.exportSceneToJson = GameConfig.exportSceneToJson;\r\n if (GameConfig.debug || Laya.Utils.getQueryString(\"debug\") == \"true\")\r\n Laya.enableDebugPanel();\r\n if (GameConfig.physicsDebug && Laya[\"PhysicsDebugDraw\"])\r\n Laya[\"PhysicsDebugDraw\"].enable();\r\n if (GameConfig.stat)\r\n Laya.Stat.show();\r\n Laya.alertGlobalError = true;\r\n Laya.ResourceVersion.enable(\"version.json\", Laya.Handler.create(this, this.onVersionLoaded), Laya.ResourceVersion.FILENAME_VERSION);\r\n }\r\n onVersionLoaded() {\r\n Laya.AtlasInfoManager.enable(\"fileconfig.json\", Laya.Handler.create(this, this.onConfigLoaded));\r\n }\r\n onConfigLoaded() {\r\n new LoadView();\r\n }\r\n}\r\nnew Main();\r\n",
  3. "references": [
  4. "E:/LayaProject/ZombieInfect/src/GameConfig.ts",
  5. "E:/LayaProject/ZombieInfect/src/View/LoadView.ts",
  6. "E:/LayaProject/ZombieInfect/src/Tools/CheckMain.ts"
  7. ]
  8. }