public override void Initialize() { _musicController = GameObject.Find(HiddenObjectString.BackgroundMusic).GetComponent <MusicController>(); _flow = (int)HiddenObjectFlow.Start; StartCoroutine(FlowLoop()); }
void Awake() { //初始化窗体属性 base.CurrentUIType.UIForms_Type = UIFormType.PopUp; base.CurrentUIType.UIForms_ShowMode = UIFormShow.ReverseChange; base.CurrentUIType.UIForm_LucencyType = UIFormLucenyType.ImPenetrable; _musicController = GameObject.Find(HiddenObjectString.BackgroundMusic).GetComponent <MusicController>(); //注册按钮事件 RigisterButtonObjectEvent("Btn_Console_Close", p => { print("Btn_Volume_Plus"); SendMessage(HiddenObjectMessage.MsgStopGame, "", "False"); AudioManager.Instance.SaveAudioSetting(); CloseUIForm(HiddenObjectPage.MusicConsole, true); //DynaLinkHS.CmdAssistLT(70); GlobalApplication.IsPause = false; GameStart.Instance.SendMachineCmd(); } ); RigisterButtonObjectEvent("Btn_Volume_Plus", p => { //print("Btn_Volume_Plus"); OnClickMusicVolumePlus(); } ); RigisterButtonObjectEvent("Btn_Volume_Minus", p => { //print("Btn_Volume_Minus"); OnClickMusicVolumeMinus(); } ); RigisterButtonObjectEvent("Btn_Sound_Plus", p => { //print("Btn_Sound_Plus"); OnClickSfxVolumePlus(); } ); RigisterButtonObjectEvent("Btn_Sound_Minus", p => { //print("Btn_Sound_Minus"); OnclickSfxVolumeMinus(); } ); RigisterButtonObjectEvent("Btn_Type_Right", p => { //print("Btn_Type_Right"); OnClickMusicTypeRight(); } ); RigisterButtonObjectEvent("Btn_Type_Left", p => { //print("Btn_Type_Left"); OnClickMusicTypeLeft(); } ); RigisterButtonObjectEvent("Btn_BGMusic_Right", p => { //print("Btn_BGMusic_Right"); OnClickBGMusicRight(); } ); RigisterButtonObjectEvent("Btn_BGMusic_Left", p => { //print("Btn_BGMusic_Left"); OnClickBGMusicLeft(); } ); }