{
  "code": "var BitmapFont = Laya.BitmapFont;\r\nvar Text = Laya.Text;\r\nvar Handler = Laya.Handler;\r\nexport class ConstructManager {\r\n    constructor() {\r\n        this.tarDis = 30;\r\n        this.constructArr = [];\r\n        this.fontName = \"diyFont\";\r\n    }\r\n    static get Instance() {\r\n        return this.instance || (this.instance = new ConstructManager());\r\n    }\r\n    Init(builds) {\r\n        this.constructArr.push(builds.getChildAt(2));\r\n        this.constructArr.push(builds.getChildAt(1));\r\n        this.constructArr.push(builds.getChildAt(0));\r\n    }\r\n    CheckMainRolePos(_zp) {\r\n        let d = this.tarDis - _zp;\r\n        if (d > 0)\r\n            return;\r\n        this.SwitchRoad();\r\n    }\r\n    loadFont() {\r\n        var bitmapFont = new BitmapFont();\r\n        bitmapFont.loadFont(\"res/bitmapFont/test.fnt\", new Handler(this, this.onFontLoaded, [bitmapFont]));\r\n    }\r\n    onFontLoaded(bitmapFont) {\r\n        bitmapFont.setSpaceWidth(10);\r\n        Text.registerBitmapFont(this.fontName, bitmapFont);\r\n        this.createText(this.fontName);\r\n    }\r\n    createText(font) {\r\n        var txt = new Text();\r\n        txt.width = 250;\r\n        txt.wordWrap = true;\r\n        txt.text = \"Do one thing at a time, and do well.\";\r\n        txt.font = font;\r\n        txt.leading = 5;\r\n        txt.pos(Laya.stage.width - txt.width >> 1, Laya.stage.height - txt.height >> 1);\r\n        Laya.stage.addChild(txt);\r\n    }\r\n    SwitchRoad() {\r\n        let rs = this.constructArr.pop();\r\n        rs.transform.localPositionZ = this.tarDis + 60;\r\n        this.constructArr.unshift(rs);\r\n        this.tarDis = this.tarDis + 30;\r\n    }\r\n    SetConstruct() {\r\n        for (let index = this.constructArr.length - 1; index >= 0; index--) {\r\n            const element = this.constructArr[index];\r\n            element.transform.localPositionZ = (2 - index) * 30;\r\n        }\r\n        this.tarDis = 30;\r\n    }\r\n}\r\n//# sourceMappingURL=ConstructManager.js.map",
  "references": [],
  "map": "{\"version\":3,\"file\":\"ConstructManager.js\",\"source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