e5286019f09c8340a83827f37affbd81525daf53 2.2 KB

123456789
  1. {
  2. "code": "import GameConfig from \"./GameConfig\";\r\nimport { LoadWindow } from \"./Window/LoadWindow\";\r\nimport WxApi from \"./WXSDK/wxsdk\";\r\nexport class Main {\r\n constructor() {\r\n this.localAtlas = [\r\n \"res/atlas/local.atlas\",\r\n \"res/atlas/local.png\",\r\n \"res/atlas/load.atlas\",\r\n \"res/atlas/load.png\",\r\n ];\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.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 Main.OnWx = Laya.Browser.onWeiXin;\r\n if (Main.OnWx)\r\n WxApi.Instance.WxInit(() => { });\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 console.log(\"开始加载图集\");\r\n Laya.loader.create(this.localAtlas, Laya.Handler.create(this, () => {\r\n new LoadWindow();\r\n console.log(\"图集加载完毕---\");\r\n }));\r\n }\r\n}\r\nMain.Ver = \"1.0.85\";\r\nMain.sceneValue = \"000000\";\r\nnew Main();\r\n",
  3. "references": [
  4. "C:/Users/admin/Desktop/runner/src/GameConfig.ts",
  5. "C:/Users/admin/Desktop/runner/src/Window/LoadWindow.ts",
  6. "C:/Users/admin/Desktop/runner/src/WXSDK/wxsdk.ts"
  7. ]
  8. }