{
  "code": "import { ResourcesPath, AssetManager } from \"../Tools/AssetManager\";\r\nimport { EventManager, EventState } from \"../Tools/EventManager\";\r\nimport { GameManager } from \"../Game/GameManager\";\r\nexport class LoadView {\r\n    constructor() {\r\n        LoadView.ins = this;\r\n        this.Init();\r\n    }\r\n    static get Instance() {\r\n        if (LoadView.ins) {\r\n            return LoadView.ins;\r\n        }\r\n        else {\r\n            return new LoadView();\r\n        }\r\n    }\r\n    Init() {\r\n        new ResourcesPath();\r\n        new GameManager();\r\n        this.LoadScene();\r\n    }\r\n    LoadComplete() {\r\n        console.log(\"加载完毕--\");\r\n        EventManager.EventTrigger(EventState.LoadComplete);\r\n    }\r\n    LoadScene() {\r\n        Laya.Scene3D.load(ResourcesPath.MainScene, Laya.Handler.create(this, (scene) => {\r\n            this.scene = scene;\r\n            AssetManager.Instance.mainscene = this.scene;\r\n            console.log(\"场景加载完毕\");\r\n            this.LoadEnemy();\r\n        }));\r\n    }\r\n    LoadEnemy() {\r\n        var path = [];\r\n        for (let i = 0; i < ResourcesPath.Enemy.length; i++) {\r\n            path.push(ResourcesPath.Enemy[i]);\r\n        }\r\n        Laya.loader.create(path, Laya.Handler.create(this, () => {\r\n            for (let i = 0; i < ResourcesPath.Enemy.length; i++) {\r\n                var model = Laya.loader.getRes(ResourcesPath.Enemy[i]);\r\n                AssetManager.Instance.Enemy.set(i + 1, model);\r\n                Laya.loader.clearRes(ResourcesPath.Enemy[i]);\r\n            }\r\n            console.log(\"敌人模型资源加载完毕---\");\r\n            this.LoadPlayer();\r\n        }));\r\n    }\r\n    LoadPlayer() {\r\n        var path = [];\r\n        for (let i = 0; i < ResourcesPath.Player.length; i++) {\r\n            path.push(ResourcesPath.Player[i]);\r\n        }\r\n        Laya.loader.create(path, Laya.Handler.create(this, () => {\r\n            for (let i = 0; i < ResourcesPath.Player.length; i++) {\r\n                var model = Laya.loader.getRes(ResourcesPath.Player[i]);\r\n                AssetManager.Instance.Player.set(i + 1, model);\r\n                Laya.loader.clearRes(ResourcesPath.Player[i]);\r\n            }\r\n            console.log(\"玩家模型资源加载完毕---\");\r\n            this.LoadHorse();\r\n        }));\r\n    }\r\n    LoadHorse() {\r\n        var path = [];\r\n        for (let i = 0; i < ResourcesPath.Horse.length; i++) {\r\n            path.push(ResourcesPath.Horse[i]);\r\n        }\r\n        Laya.loader.create(path, Laya.Handler.create(this, () => {\r\n            for (let i = 0; i < ResourcesPath.Horse.length; i++) {\r\n                var model = Laya.loader.getRes(ResourcesPath.Horse[i]);\r\n                AssetManager.Instance.Horse.set(i + 1, model);\r\n                Laya.loader.clearRes(ResourcesPath.Horse[i]);\r\n            }\r\n            console.log(\"马模型资源加载完毕---\");\r\n            this.LoadComplete();\r\n        }));\r\n    }\r\n}\r\n//# sourceMappingURL=LoadView.js.map",
  "references": [
    "E:/LayaProject/ArcherWorrior/src/Tools/AssetManager.ts",
    "E:/LayaProject/ArcherWorrior/src/Tools/EventManager.ts",
    "E:/LayaProject/ArcherWorrior/src/Game/GameManager.ts"
  ],
  "map": "{\"version\":3,\"file\":\"LoadView.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../src/View/LoadView.ts\"],\"names\":[],\"mappings\":\"AAAA,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACpE,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAElD,MAAM,OAAO,QAAQ;IAGjB;QACI,QAAQ,CAAC,GAAG,GAAG,IAAI,CAAC;QACpB,IAAI,CAAC,IAAI,EAAE,CAAC;IAChB,CAAC;IACM,MAAM,KAAK,QAAQ;QACtB,IAAG,QAAQ,CAAC,GAAG,EAAC;YACZ,OAAO,QAAQ,CAAC,GAAG,CAAA;SACtB;aACG;YACA,OAAO,IAAI,QAAQ,EAAE,CAAC;SACzB;IACL,CAAC;IACD,IAAI;QACA,IAAI,aAAa,EAAE,CAAC;QACp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