Esempio n. 1
0
    public MNRateUsPopup(string title, string message, string rateUs, string decline, string remind) : base(title, message)
    {
        AddAction(remind, () => {
            if (remindListener != null)
            {
                remindListener.Invoke();
            }
        });

        AddAction(decline, () => {
            if (declineListener != null)
            {
                declineListener.Invoke();
            }
        });

        AddAction(rateUs, () => {
                                                #if UNITY_ANDROID
            MNAndroidNative.RedirectStoreRatingPage(androidAppUrl);
                                                #elif UNITY_IOS
            MNIOSNative.RedirectToAppStoreRatingPage(appleId);
                                                #endif

            if (rateUsListener != null)
            {
                rateUsListener.Invoke();
            }
        });
    }
Esempio n. 2
0
    //--------------------------------------
    //  EVENTS
    //--------------------------------------

    private void OnPopupCompleted(string action)
    {
        if (actions.ContainsKey(action))
        {
            actions [action].Invoke();
        }
        else
        {
            if (action.Equals(DISMISS_ACTION) && dismissCallback != null)
            {
                dismissCallback.Invoke();
            }
        }
    }