{
  "code": "import Dictionary from \"../GameUtils/Dictionary\";\r\nimport { LevelManager } from \"../Manager/LevelManager\";\r\nimport { CameraManager } from \"../Manager/CameraManager\";\r\nimport { DispatcherManager, EventState } from \"../GameUtils/EventManager\";\r\nimport { ViewManager, ViewType } from \"../View/ViewManager\";\r\nimport { NodeUtil } from \"../GameUtils/NodeUtil\";\r\nexport class AssetManager {\r\n    constructor() {\r\n        this.Prop = new Dictionary();\r\n        this.Character = new Dictionary();\r\n        AssetManager.ins = this;\r\n        DispatcherManager.EventOn(EventState.LoadComplete, this, this.Init);\r\n    }\r\n    static get Instance() {\r\n        if (AssetManager.ins == null) {\r\n            return new AssetManager();\r\n        }\r\n        return AssetManager.ins;\r\n    }\r\n    Init() {\r\n        Laya.stage.addChild(this.mainscene);\r\n        this.maincamera = this.mainscene.getChildByName(\"Main Camera\");\r\n        this.maincamera.enableHDR = false;\r\n        CameraManager.Instance.camera = this.maincamera;\r\n        let _sprite = new Laya.Sprite3D();\r\n        this.mainscene.addChild(_sprite);\r\n        LevelManager.Instance.spritepool = _sprite;\r\n        this.SetCharacterPos();\r\n        LevelManager.Instance.RegEvent();\r\n        LevelManager.Instance.GameStart();\r\n        ViewManager.Instance.ShowView(ViewType.HomeView);\r\n    }\r\n    getPref(name) {\r\n        return this.Prop.get(name);\r\n    }\r\n    getRolePref(index) {\r\n        return this.Character.get(index);\r\n    }\r\n    SetCharacterPos() {\r\n        let _level = this.mainscene.getChildByName(\"level1\");\r\n        for (let i = 0; i < _level.numChildren; i++) {\r\n            let item = _level.getChildAt(i);\r\n            if (item.name == \"player\") {\r\n                this.playerpos = item;\r\n            }\r\n            else if (item.name == \"role\") {\r\n                let _pref = this.getRolePref(1);\r\n                let _player = Laya.Sprite3D.instantiate(_pref);\r\n                LevelManager.Instance.spritepool.addChild(_player);\r\n                _player.transform.position = item.transform.position.clone();\r\n                _player.transform.rotation = item.transform.rotation.clone();\r\n                NodeUtil.SetColliderGroup(_player, 100);\r\n            }\r\n        }\r\n    }\r\n}\r\n//# sourceMappingURL=AssetManager.js.map",
  "references": [
    "E:/LayaProject/DanceLine/RubikCube/src/GameUtils/Dictionary.ts",
    "E:/LayaProject/DanceLine/RubikCube/src/Manager/LevelManager.ts",
    "E:/LayaProject/DanceLine/RubikCube/src/Manager/CameraManager.ts",
    "E:/LayaProject/DanceLine/RubikCube/src/GameUtils/EventManager.ts",
    "E:/LayaProject/DanceLine/RubikCube/src/View/ViewManager.ts",
    "E:/LayaProject/DanceLine/RubikCube/src/GameUtils/NodeUtil.ts"
  ],
  "map": "{\"version\":3,\"file\":\"AssetManager.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../src/Resources/AssetManager.ts\"],\"names\":[],\"mappings\":\"AAAA,OAAO,UAAU,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAC1E,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjD,MAAM,OAAO,YAAY;IAErB;QAUO,SAAI,GAAc,IAAI,UAAU,EAAE,CAAC;QACnC,cAAS,GAAc,IAAI,UAAU,EAAE,CAAC;QAV3C,YAAY,CAAC,GAAG,GAAG,IAAI,CAAC;QACxB,iBAAiB,CAAC,OAAO,CAAC,UAAU,CAAC,YAAY,EAAC,IAAI,EAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACtE,CAAC;IACM,MAAM,KAAK,QAAQ;QACtB,IAAG,YAAY,CAAC,GAAG,IAAI,IAAI,EAAC;YACxB,OAAO,IAAI,YAAY,EAAE,CAAC;SAC7B;QACD,OAAO,YAAY,CAAC,GAAG,CAAC;IAC5B,CAAC;IAUD,IAAI;QACA,IAAI,CAAC,K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