{
  "code": "import { ui } from \"../ui/layaMaxUI\";\r\nimport { GameUtils } from \"../GameUtils/GameUtils\";\r\nimport { GameManager, GameState } from \"../Scripts/Game/GameManager\";\r\nimport { NetworkManager, PROTOCOLS } from \"../Scripts/Network/NetworkManager\";\r\nimport { PlayerAccount } from \"../Scripts/Network/PlayerAccount\";\r\nimport WxApi from \"../WXSDK/wxsdk\";\r\nimport { LevelManager } from \"../Scripts/Game/LevelManager\";\r\nexport class QueueWindow extends ui.Window.QueueWindowUI {\r\n    constructor() {\r\n        super();\r\n        this.queueAtlas = [\r\n            \"res/atlas/local.atlas\",\r\n            \"res/atlas/local.png\",\r\n            \"res/atlas/load.atlas\",\r\n            \"res/atlas/load.png\",\r\n        ];\r\n        this.indess = [];\r\n        QueueWindow.instance = this;\r\n    }\r\n    static get Instance() {\r\n        return QueueWindow.instance;\r\n    }\r\n    OnOpen(_data = null) {\r\n        WxApi.Instance.recordAldEvent(\"进入排队界面\", \"1\");\r\n        var agrs = [{ \"t\": PlayerAccount.CurrentAccount.ServerTime.toString() }, { \"n\": \"5\" }];\r\n        NetworkManager.Instance.HttpPostRequest(PROTOCOLS.game, agrs, Laya.Handler.create(this, this.OnStarcomplete), null);\r\n        this.height = Laya.stage.height;\r\n    }\r\n    OnResLoad() {\r\n        Laya.timer.once(1000, this, this.OnQueueEnd);\r\n        for (var i = 1; i < 30; i++) {\r\n            this.indess.push(i);\r\n        }\r\n        for (var i = 0; i < this.quelist.numChildren; i++) {\r\n            var cursprite = this.quelist.getChildAt(i);\r\n            this.ShowIcon(cursprite);\r\n        }\r\n    }\r\n    OnStarcomplete(e) {\r\n        this.OnResLoad();\r\n    }\r\n    ShowIcon(_sprite) {\r\n        var time = GameUtils.getRandomInt(0, 900);\r\n        Laya.timer.once(time, this, () => {\r\n            var index = GameUtils.getRandomInt(0, this.indess.length);\r\n            var num = this.indess[index];\r\n            this.indess.splice(index, 1);\r\n            _sprite.skin = \"icon/\" + num + \".png\";\r\n        }, null, false);\r\n    }\r\n    OnQueueEnd() {\r\n        WxApi.Instance.recordAldEvent(\"排队结束开始游戏\", \"1\");\r\n        var stage = LevelManager.Instance.curLevel;\r\n        WxApi.Instance.levelStart(stage.levelid.toString(), stage.levelid.toString(), PlayerAccount.CurrentAccount.CurAccountData.UseId);\r\n        GameManager.Instance.ChangeState(GameState.Playing);\r\n    }\r\n    OnHide() {\r\n    }\r\n}\r\n//# sourceMappingURL=QueueWindow.js.map",
  "references": [
    "C:/Users/admin/Desktop/runner/src/Window/Component/IWindow.ts",
    "C:/Users/admin/Desktop/runner/src/ui/layaMaxUI.ts",
    "C:/Users/admin/Desktop/runner/src/GameUtils/GameUtils.ts",
    "C:/Users/admin/Desktop/runner/src/Scripts/Game/GameManager.ts",
    "C:/Users/admin/Desktop/runner/src/Scripts/Network/NetworkManager.ts",
    "C:/Users/admin/Desktop/runner/src/Scripts/Network/PlayerAccount.ts",
    "C:/Users/admin/Desktop/runner/src/WXSDK/wxsdk.ts",
    "C:/Users/admin/Desktop/runner/src/Main.ts",
    "C:/Users/admin/Desktop/runner/src/Scripts/Game/LevelManager.ts"
  ],
  "map": "{\"version\":3,\"file\":\"QueueWindow.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../src/Window/QueueWindow.ts\"],\"names\":[],\"mappings\":\"AAEA,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAC9E,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AACjE,OAAO,KAAK,MAAM,gBAAgB,CAAC;AAEnC,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAG5D,MAAM,OAAO,WAAY,SAAQ,EAAE,CAAC,MAAM,CAAC,aAAa;IAG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