{ "code": "import { SwitchButton } from \"./Component/SwitchButton\";\r\nimport { WindowManager, WindowType } from \"./WindowManager\";\r\nimport { ui } from \"../ui/layaMaxUI\";\r\nimport PlaySoundManager from \"../Scripts/Game/PlaySoundManager\";\r\nimport WxApi from \"../WXSDK/wxsdk\";\r\nimport { PlayerAccount, AccountUser } from \"../Scripts/Network/PlayerAccount\";\r\nexport class SettingWindow extends ui.Window.SettingWindowUI {\r\n constructor() {\r\n super();\r\n SettingWindow.instance = this;\r\n }\r\n static get Instance() {\r\n return SettingWindow.instance;\r\n }\r\n OnOpen(_data = null) {\r\n this.userid.text = \"用户ID:\" + PlayerAccount.CurrentAccount.CurAccountData.GetUser(AccountUser.user_id);\r\n this.closeBtn.clickHandler = Laya.Handler.create(this, this.OnCLickClose);\r\n this.soundswitctbutton = this.soundPan.addComponent(SwitchButton);\r\n this.shakeswitchbutton = this.shakePan.addComponent(SwitchButton);\r\n this.soundswitctbutton.Init(PlaySoundManager.CanPlaySound, Laya.Handler.create(this, this.OnOpenSound, [true], false), Laya.Handler.create(this, this.OnOpenSound, [false], false));\r\n this.shakeswitchbutton.Init(WxApi.CanShake, Laya.Handler.create(this, this.OnOpenShake, [true], false), Laya.Handler.create(this, this.OnOpenShake, [false], false));\r\n this.height = Laya.stage.height;\r\n }\r\n OnOpenSound(_open) {\r\n PlaySoundManager.CanPlaySound = _open;\r\n }\r\n OnOpenShake(_open) {\r\n WxApi.CanShake = _open;\r\n }\r\n OnCLickClose() {\r\n WindowManager.Instance.ShowWindow(WindowType.HomeWindow);\r\n }\r\n OnHide() {\r\n }\r\n}\r\n", "references": [ "C:/Users/admin/Desktop/runner/src/Window/Component/IWindow.ts", "C:/Users/admin/Desktop/runner/src/Window/Component/SwitchButton.ts", "C:/Users/admin/Desktop/runner/src/Window/WindowManager.ts", "C:/Users/admin/Desktop/runner/src/ui/layaMaxUI.ts", "C:/Users/admin/Desktop/runner/src/Scripts/Game/PlaySoundManager.ts", "C:/Users/admin/Desktop/runner/src/WXSDK/wxsdk.ts", "C:/Users/admin/Desktop/runner/src/Scripts/Network/PlayerAccount.ts" ] }