Beispiel #1
0
    /// <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();
    }
Beispiel #2
0
    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);
    }
Beispiel #3
0
 public void UpdateBtnMusic()
 {
     UIHomeBase.UpdateBtnMusic(btnMusic);
 }