コード例 #1
0
    public static bool show(string zoneId, string rewardItemKey, Dictionary <string, string> options)
    {
        if (!_adsShow && _campaignsAvailable)
        {
            if (SharedInstance)
            {
                string optionsString = parseOptionsDictionary(options);

                if (UnityAdsExternal.show(zoneId, rewardItemKey, optionsString))
                {
                    if (_adsShowDelegate != null)
                    {
                        _adsShowDelegate();
                    }

                    _adsShow             = true;
                    _savedTimeScale      = Time.timeScale;
                    _savedAudioVolume    = AudioListener.volume;
                    AudioListener.pause  = true;
                    AudioListener.volume = 0;
                    Time.timeScale       = 0;

                    return(true);
                }
            }
        }

        return(false);
    }