{
  "code": "import { CameraState } from \"./Camera\";\r\nimport { ConstructManager } from \"../Manager/ConstructManager\";\r\nimport { MainRoleManager } from \"../Manager/MainRoleManager\";\r\nimport { MoundManager } from \"../Manager/MoundManager\";\r\nimport { CameraManager } from \"../Manager/CameraManager\";\r\nimport { PlaneManager } from \"../Manager/PlaneManager\";\r\nimport { LevelController } from \"./LevelController\";\r\nimport StreetManager from \"../Manager/StreetManager\";\r\nimport { GameVersion } from \"../Net/GameVersion\";\r\nvar Sprite = Laya.Sprite;\r\nvar BlurFilter = Laya.BlurFilter;\r\nexport class Scene3DManager {\r\n    constructor() {\r\n        this.apePath = \"res/apes/monkey2.png\";\r\n    }\r\n    static get Instance() {\r\n        return Scene3DManager.instance || (Scene3DManager.instance = new Scene3DManager());\r\n    }\r\n    InitGame() {\r\n        Laya.timer.frameOnce(10, this, () => {\r\n            MainRoleManager.Instance.MadePlayer();\r\n            this.InItScene();\r\n        });\r\n    }\r\n    ;\r\n    Init(_s) {\r\n        if (_s) {\r\n            this.MainScene = _s;\r\n            Laya.stage.addChild(_s);\r\n        }\r\n        else {\r\n            console.error(\"场景不存在\");\r\n            return;\r\n        }\r\n        let sceneNode;\r\n        sceneNode = this.MainScene.getChildByName(\"scene\");\r\n        if (!sceneNode) {\r\n            console.error(\"场景资源配置错误!\");\r\n            return;\r\n        }\r\n        this.MainCamera = this.MainScene.getChildByName(\"Main Camera\");\r\n        this.MainCamera.enableHDR = false;\r\n        this.bulletCon = sceneNode.getChildByName(\"bulletContainer\");\r\n        this.effectCon = sceneNode.getChildByName(\"effectPos\");\r\n        this.SetSceneMaterial();\r\n        let build = sceneNode.getChildByName(\"buildings\");\r\n        ConstructManager.Instance.Init(build);\r\n        let playerStartPos = sceneNode.getChildByName(\"playerstartPoint\");\r\n        let playerCon = sceneNode.getChildByName(\"playerContainer\");\r\n        MainRoleManager.Instance.Init(playerStartPos, playerCon);\r\n        let moveBlockContainer = sceneNode.getChildByName(\"BlockContainer\");\r\n        StreetManager.Instance.Init(moveBlockContainer);\r\n        let towerContainer = sceneNode.getChildByName(\"towerContainer\");\r\n        MoundManager.Instance.Init(towerContainer);\r\n        let startCampos1 = sceneNode.getChildByName(\"startCamPos\");\r\n        let startCamposX = sceneNode.getChildByName(\"startXCamPos\");\r\n        let ps;\r\n        if (GameVersion.isX)\r\n            ps = startCamposX;\r\n        else\r\n            ps = startCampos1;\r\n        CameraManager.Instance.Init(this.MainCamera, ps);\r\n        let finalPos = sceneNode.getChildByName(\"finalPos\");\r\n        PlaneManager.Instance.Init(finalPos);\r\n        this.InitGame();\r\n    }\r\n    createApe() {\r\n        var ape = new Sprite();\r\n        ape.loadImage(this.apePath);\r\n        ape.x = (Laya.stage.width - ape.width) / 2;\r\n        ape.y = (Laya.stage.height - ape.height) / 2;\r\n        Laya.stage.addChild(ape);\r\n        this.applayFilter(ape);\r\n    }\r\n    applayFilter(ape) {\r\n        var blurFilter = new BlurFilter();\r\n        blurFilter.strength = 5;\r\n        ape.filters = [blurFilter];\r\n    }\r\n    SetSceneMaterial() {\r\n        this.MainCamera.clearFlag = Laya.BaseCamera.CLEARFLAG_SKY;\r\n        let skyRenderer = this.MainScene.skyRenderer;\r\n        skyRenderer.mesh = Laya.SkyDome.instance;\r\n        let mat = new Laya.SkyProceduralMaterial();\r\n        skyRenderer.material = mat;\r\n        mat.sunDisk = Laya.SkyProceduralMaterial.SUN_NODE;\r\n        mat.skyTint = new Laya.Vector4(1, 0.74, 0.74, 1);\r\n    }\r\n    InItScene() {\r\n        LevelController.Instance.SetLevel();\r\n        PlaneManager.Instance.SetAir();\r\n        ConstructManager.Instance.SetConstruct();\r\n        CameraManager.Instance.SetCameraAction(CameraState.game, 1);\r\n        MainRoleManager.Instance.SetPlayerPosition();\r\n    }\r\n}\r\n//# sourceMappingURL=Scene3DManager.js.map",
  "references": [
    "C:/Users/Administrator/Desktop/gungang/src/Game/Camera.ts",
    "C:/Users/Administrator/Desktop/gungang/src/Game/ParticleManager.ts",
    "C:/Users/Administrator/Desktop/gungang/src/Game/ResourcesManager.ts",
    "C:/Users/Administrator/Desktop/gungang/src/Util/GameTool.ts",
    "C:/Users/Administrator/Desktop/gungang/src/Game/GameManager.ts",
    "C:/Users/Administrator/Desktop/gungang/src/Manager/ConstructManager.ts",
    "C:/Users/Administrator/Desktop/gungang/src/Manager/MainRoleManager.ts",
    "C:/Users/Administrator/Desktop/gungang/src/Manager/MoundManager.ts",
    "C:/Users/Administrator/Desktop/gungang/src/Manager/CameraManager.ts",
    "C:/Users/Administrator/Desktop/gungang/src/Manager/PlaneManager.ts",
    "C:/Users/Administrator/Desktop/gungang/src/Game/LevelController.ts",
    "C:/Users/Administrator/Desktop/gungang/src/Manager/StreetManager.ts",
    "C:/Users/Administrator/Desktop/gungang/src/Net/GameVersion.ts"
  ],
  "map": "{\"version\":3,\"file\":\"Scene3DManager.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../src/Game/Scene3DManager.ts\"],\"names\":[],\"mappings\":\"AAEA,OAAQ,EAAE,WAAW,EAAS,MAAM,UAAU,CAAC;AAQ/C,OAAO,EAAC,gBAAgB,EAAC,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAC,eAAe,EAAC,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAC,YAAY,EAAC,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAC,aAAa,EAAC,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAC,YAAY,EAAC,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAClD,OAAO,aAAa,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAC,WAAW,EAAC,MAAM,oBAAoB,CAAC;AAG/C,IAAO,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;AAE5B,IAAO,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC;AAKpC,MAAM,OAAO,cAAc;IAA3B;QAgEY,YAAO,GAAW,sBAAsB,CAAC;IA6CrD,CAAC;IA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