{
  "code": "import { ui } from \"../ui/layaMaxUI\";\r\nimport { ViewManager, ViewType } from \"./ViewManager\";\r\nimport { DispatcherManager, StageState } from \"../GameUtils/EventManager\";\r\nimport { PlayerManager } from \"../Manager/PlayerManager\";\r\nimport { AccountManager } from \"../NetWork/AccountManager\";\r\nimport { ServerManager, TeamWave } from \"../NetWork/ServerManager\";\r\nimport { GameManager } from \"../Manager/GameManager\";\r\nimport { AudioManager, BGMType } from \"../Manager/AudioManager\";\r\nimport { WXSDK } from \"../NetWork/WXSDK\";\r\nexport class HomeView extends ui.HomeViewUI {\r\n    constructor() {\r\n        super();\r\n        HomeView.ins = this;\r\n    }\r\n    static get Instance() {\r\n        if (HomeView.ins == null) {\r\n            return new HomeView();\r\n        }\r\n        return HomeView.ins;\r\n    }\r\n    OnShow() {\r\n        console.log(\"主界面\");\r\n        this.RefreshUI();\r\n        this.RegButton();\r\n        this.handclick.play(null, true);\r\n    }\r\n    RegButton() {\r\n        this.StartBtn.clickHandler = new Laya.Handler(this, this.Start);\r\n        this.SignBtn.clickHandler = new Laya.Handler(this, this.ClickSign);\r\n        this.LotteryBtn.clickHandler = new Laya.Handler(this, this.ClickLottery);\r\n        this.SkinBtn.clickHandler = new Laya.Handler(this, this.ClickSKin);\r\n        this.SetBtn.clickHandler = new Laya.Handler(this, this.ShowSetPanel);\r\n        this.CloseSetBtn.clickHandler = new Laya.Handler(this, this.HideSetPanel);\r\n        this.shakebtn.clickHandler = new Laya.Handler(this, this.ClickShake);\r\n        this.soundbtn.clickHandler = new Laya.Handler(this, this.ClickSound);\r\n        this.height = Laya.stage.height;\r\n        Laya.stage.on(Laya.Event.RESIZE, this, () => {\r\n            this.height = Laya.stage.height;\r\n        });\r\n    }\r\n    RefreshUI() {\r\n        let stage = Number(AccountManager.Instance.curplayerData.GainAccount(\"stage\")) + 1;\r\n        this.NowLevelNum.text = stage + \"\";\r\n        this.GoldNum.text = AccountManager.Instance.curplayerData.GainAccount(\"money\");\r\n    }\r\n    Start() {\r\n        var agrs = [{ \"t\": AccountManager.Instance.ServerTime.toString() }];\r\n        ServerManager.Instance.SendHttp(TeamWave.KaiShi, agrs, Laya.Handler.create(this, (data) => {\r\n            GameManager.play_id = data.play_id;\r\n            PlayerManager.Instance.EnablePlayer();\r\n            this.handclick.stop();\r\n            this.shou.visible = false;\r\n            ViewManager.Instance.ShowView(ViewType.InGameView);\r\n            DispatcherManager.StageTrigger(StageState.Start);\r\n        }), null);\r\n    }\r\n    ShowSetPanel() {\r\n        this.SetPanel.visible = true;\r\n        let shakeon = this.SetPanel.getChildAt(0).getChildByName(\"shake\").getChildByName(\"on\");\r\n        let shakeoff = this.SetPanel.getChildAt(0).getChildByName(\"shake\").getChildByName(\"off\");\r\n        let soundon = this.SetPanel.getChildAt(0).getChildByName(\"sound\").getChildByName(\"on\");\r\n        let soundoff = this.SetPanel.getChildAt(0).getChildByName(\"sound\").getChildByName(\"off\");\r\n        soundon.visible = AudioManager.play;\r\n        soundoff.visible = !soundon.visible;\r\n        shakeon.visible = WXSDK.shake;\r\n        shakeoff.visible = !shakeon.visible;\r\n    }\r\n    HideSetPanel() {\r\n        this.SetPanel.visible = false;\r\n    }\r\n    ClickSound() {\r\n        let soundon = this.SetPanel.getChildAt(0).getChildByName(\"sound\").getChildByName(\"on\");\r\n        let soundoff = this.SetPanel.getChildAt(0).getChildByName(\"sound\").getChildByName(\"off\");\r\n        AudioManager.play = !AudioManager.play;\r\n        soundon.visible = AudioManager.play;\r\n        soundoff.visible = !soundon.visible;\r\n        if (AudioManager.play) {\r\n            AudioManager.PlayBGM(BGMType.bgm);\r\n        }\r\n        else {\r\n            AudioManager.StopMusic();\r\n        }\r\n    }\r\n    ClickShake() {\r\n        let shakeon = this.SetPanel.getChildAt(0).getChildByName(\"shake\").getChildByName(\"on\");\r\n        let shakeoff = this.SetPanel.getChildAt(0).getChildByName(\"shake\").getChildByName(\"off\");\r\n        WXSDK.shake = !WXSDK.shake;\r\n        shakeon.visible = WXSDK.shake;\r\n        shakeoff.visible = !shakeon.visible;\r\n    }\r\n    ClickSign() {\r\n        WXSDK.ShowTxt(\"暂未开放\");\r\n    }\r\n    ClickLottery() {\r\n        WXSDK.ShowTxt(\"暂未开放\");\r\n    }\r\n    ClickSKin() {\r\n        WXSDK.ShowTxt(\"暂未开放\");\r\n    }\r\n    OnHide() {\r\n    }\r\n}\r\n//# sourceMappingURL=HomeView.js.map",
  "references": [
    "E:/LayaProject/DanceLine/RubikCube/src/ui/layaMaxUI.ts",
    "E:/LayaProject/DanceLine/RubikCube/src/View/ViewManager.ts",
    "E:/LayaProject/DanceLine/RubikCube/src/GameUtils/EventManager.ts",
    "E:/LayaProject/DanceLine/RubikCube/src/Manager/PlayerManager.ts",
    "E:/LayaProject/DanceLine/RubikCube/src/NetWork/AccountManager.ts",
    "E:/LayaProject/DanceLine/RubikCube/src/NetWork/ServerManager.ts",
    "E:/LayaProject/DanceLine/RubikCube/src/Manager/GameManager.ts",
    "E:/LayaProject/DanceLine/RubikCube/src/Manager/AudioManager.ts",
    "E:/LayaProject/DanceLine/RubikCube/src/NetWork/WXSDK.ts"
  ],
  "map": "{\"version\":3,\"file\":\"HomeView.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../src/View/HomeView.ts\"],\"names\":[],\"mappings\":\"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAC1E,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,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