{
  "code": "import { AssetPath } from \"./AssetManager\";\r\nimport { GamePool } from \"./GamePool\";\r\nimport { Scene3DManager } from \"./Scene3DManager\";\r\nvar Sprite = Laya.Sprite;\r\nvar GlowFilter = Laya.GlowFilter;\r\nexport class ResourcesManager {\r\n    constructor() {\r\n        this.cloth = [];\r\n        this.apePath = \"res/apes/monkey2.png\";\r\n    }\r\n    static get Instance() {\r\n        return this.instance || (this.instance = new ResourcesManager());\r\n    }\r\n    static LoadResource(path, complet) {\r\n        Laya.loader.retryNum = 2;\r\n        Laya.loader.maxLoader = 3;\r\n        Laya.loader.retryDelay = 100;\r\n        Laya.loader.create(path, new Laya.Handler(this, complet));\r\n        Laya.loader.on(Laya.Event.ERROR, this, (data) => {\r\n            console.log(data + \" 资源加载失败\");\r\n        });\r\n    }\r\n    InitAsset() {\r\n        AssetPath.Player.forEach(element => {\r\n            let _player = Laya.loader.getRes(element);\r\n            Laya.loader.clearRes(element);\r\n            this.LoadPoolRes(_player.name, _player);\r\n        });\r\n        AssetPath.Particle.forEach(element => {\r\n            let _effect = Laya.loader.getRes(element);\r\n            Laya.loader.clearRes(element);\r\n            this.LoadPoolRes(_effect.name, _effect);\r\n        });\r\n        let _enemy = Laya.loader.getRes(AssetPath.Enemy);\r\n        Laya.loader.clearRes(AssetPath.Enemy);\r\n        this.LoadPoolRes(_enemy.name, _enemy);\r\n        let _playerbullet = Laya.loader.getRes(AssetPath.PlayerShot);\r\n        Laya.loader.clearRes(AssetPath.PlayerShot);\r\n        this.LoadPoolRes(_playerbullet.name, _playerbullet);\r\n        let _tower = Laya.loader.getRes(AssetPath.Mound);\r\n        Laya.loader.clearRes(AssetPath.Mound);\r\n        this.LoadPoolRes(_tower.name, _tower);\r\n        let _scene = Laya.loader.getRes(AssetPath.MainScene);\r\n        Laya.loader.clearRes(AssetPath.MainScene);\r\n        AssetPath.Barrier.forEach(element => {\r\n            let _barrier = Laya.loader.getRes(element);\r\n            Laya.loader.clearRes(element);\r\n            this.LoadPoolRes(_barrier.name, _barrier);\r\n        });\r\n        Scene3DManager.Instance.Init(_scene);\r\n    }\r\n    LoadPoolRes(name, prefab) {\r\n        GamePool.Instance.InitSelf(name, prefab);\r\n    }\r\n    setup() {\r\n        this.createApe();\r\n        this.applayFilter();\r\n    }\r\n    createApe() {\r\n        this.ape = new Sprite();\r\n        this.ape.loadImage(this.apePath);\r\n        var texture = Laya.loader.getRes(this.apePath);\r\n        this.ape.x = (Laya.stage.width - texture.width) / 2;\r\n        this.ape.y = (Laya.stage.height - texture.height) / 2;\r\n        Laya.stage.addChild(this.ape);\r\n    }\r\n    applayFilter() {\r\n        var glowFilter = new GlowFilter(\"#ffff00\", 10, 0, 0);\r\n        this.ape.filters = [glowFilter];\r\n    }\r\n    Load(callback) {\r\n        var arr = [\r\n            AssetPath.MainScene,\r\n            AssetPath.Enemy,\r\n            AssetPath.PlayerShot,\r\n            AssetPath.Mound,\r\n        ];\r\n        let arr1 = arr.concat(AssetPath.Player);\r\n        let arr2 = arr1.concat(AssetPath.Barrier);\r\n        let arr3 = arr2.concat(AssetPath.Particle);\r\n        ResourcesManager.LoadResource(arr3, () => {\r\n            this.InitAsset();\r\n            if (callback)\r\n                callback();\r\n        });\r\n    }\r\n}\r\n//# sourceMappingURL=ResourcesManager.js.map",
  "references": [
    "C:/Users/Administrator/Desktop/gungang/src/Game/AssetManager.ts",
    "C:/Users/Administrator/Desktop/gungang/src/Game/GamePool.ts",
    "C:/Users/Administrator/Desktop/gungang/src/Game/Scene3DManager.ts"
  ],
  "map": "{\"version\":3,\"file\":\"ResourcesManager.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../src/Game/ResourcesManager.ts\"],\"names\":[],\"mappings\":\"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAGzC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,IAAO,MAAM,GAAG,IAAI,CA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