7b802b6ced7208d7a438eb82c7c2e95f1a9b169c 1.6 KB

123456789
  1. {
  2. "code": "import ResDic from \"./ResDic\";\r\nimport { EventManager, EventState } from \"./EventManager\";\r\nexport class AssetManager {\r\n constructor() {\r\n this.Player = new ResDic();\r\n this.Enemy = new ResDic();\r\n this.Horse = new ResDic();\r\n this.Prop = new ResDic();\r\n this.Plane = new ResDic();\r\n this.Stone = new ResDic();\r\n this.Tree = new ResDic();\r\n AssetManager.ins = this;\r\n EventManager.EventOn(EventState.LoadComplete, this, this.Init);\r\n }\r\n static get Instance() {\r\n if (AssetManager.ins) {\r\n return AssetManager.ins;\r\n }\r\n else {\r\n return new AssetManager();\r\n }\r\n }\r\n Init() {\r\n this.maincamera = this.mainscene.getChildByName(\"Main Camera\");\r\n EventManager.EventTrigger(EventState.SceneInit);\r\n }\r\n}\r\nexport class ResourcesPath {\r\n}\r\nResourcesPath.MainScene = \"Game/res/MainScene/LayaScene_Mainscene/Conventional/Mainscene.ls\";\r\nResourcesPath.Horse = [\r\n \"Game/res/Role/LayaScene_Role/Conventional/horse.lh\"\r\n];\r\nResourcesPath.Player = [\r\n \"Game/res/Role/LayaScene_Role/Conventional/player.lh\"\r\n];\r\nResourcesPath.Enemy = [\r\n \"Game/res/Role/LayaScene_Role/Conventional/npc.lh\"\r\n];\r\nResourcesPath.Prop = \"Game/res/Prop/LayaScene_Prop/Conventional/Prop.lh\";\r\n",
  3. "references": [
  4. "E:/LayaProject/ArcherWorrior/src/Tools/ResDic.ts",
  5. "E:/LayaProject/ArcherWorrior/src/Tools/EventManager.ts",
  6. "E:/LayaProject/ArcherWorrior/src/Tools/GameTools.ts"
  7. ]
  8. }