/// <summary> /// Awake is called when the script instance is being loaded. /// </summary> void Awake() { if (btnShare != null) { btnShare.gameObject.SetActive(Config.main.isHaveShare); } if (btnNoAd != null) { btnNoAd.gameObject.SetActive(Config.main.isHaveRemoveAd); } if (btnMore != null) { if (!AppVersion.appCheckHasFinished) { btnMore.gameObject.SetActive(false); } if (Common.isAndroid) { if ((Config.main.channel == Source.HUAWEI) || (Config.main.channel == Source.GP)) { //华为市场不显示 btnMore.gameObject.SetActive(false); } } if (Common.isWinUWP) { btnMore.gameObject.SetActive(false); } if (Application.isEditor) { btnMore.gameObject.SetActive(true); } } if (btnAdVideo != null) { btnAdVideo.gameObject.SetActive(true); if ((Common.noad) || (!AppVersion.appCheckHasFinished)) { btnAdVideo.gameObject.SetActive(false); } if (Common.isAndroid) { if (Config.main.channel == Source.GP) { //GP市场不显示 btnAdVideo.gameObject.SetActive(false); } } } UIHomeBase.UpdateBtnMusic(btnMusic); UpdateBtnSound(); }
public void OnClickBtnMusic() { bool ret = Common.GetBool(AppString.STR_KEY_BACKGROUND_MUSIC); bool value = !ret; Common.SetBool(AppString.STR_KEY_BACKGROUND_MUSIC, value); if (value) { MusicBgPlay.main.PlayMusicBg(); } else { MusicBgPlay.main.Stop(); } UIHomeBase.UpdateBtnMusic(btnMusic); }
public void UpdateBtnMusic() { UIHomeBase.UpdateBtnMusic(btnMusic); }