Пример #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();
            }
        });
    }
Пример #2
0
    public static void ShowPreloader(string title, string message)
    {
                #if UNITY_ANDROID
        MNAndroidNative.ShowPreloader(title, message, MNP_PlatformSettings.Instance.AndroidDialogTheme);
                #endif

                #if UNITY_IPHONE
        MNIOSNative.ShowPreloader();
                #endif
    }
Пример #3
0
    public static void HidePreloader()
    {
                #if UNITY_ANDROID
        MNAndroidNative.HidePreloader();
                #endif


                #if UNITY_IPHONE
        MNIOSNative.HidePreloader();
                #endif
    }
Пример #4
0
    public static void ShowPreloader(string title, string message)
    {
                #if UNITY_ANDROID
        MNAndroidNative.ShowPreloader(title, message);
                #endif

                #if UNITY_IPHONE
        MNIOSNative.ShowPreloader();
                #endif

                #if UNITY_WP8 || UNITY_METRO
        WP8PopUps.PopUp.ShowPreLoader(100);
                #endif
    }
Пример #5
0
    public static void HidePreloader()
    {
                #if UNITY_ANDROID
        MNAndroidNative.HidePreloader();
                #endif


                #if UNITY_IPHONE
        MNIOSNative.HidePreloader();
                #endif


                #if UNITY_WP8 || UNITY_METRO
        WP8PopUps.PopUp.HidePreLoader();
                #endif
    }
Пример #6
0
    //--------------------------------------
    //  PUBLIC METHODS
    //--------------------------------------

    public void Show()
    {
        StringBuilder        builder    = new StringBuilder();
        IEnumerator <string> enumerator = actions.GetEnumerator();

        if (enumerator.MoveNext())
        {
            builder.Append(enumerator.Current);
        }

        while (enumerator.MoveNext())
        {
            builder.Append("|");
            builder.Append(enumerator.Current);
        }

        MNIOSNative.showMessage(title, message, builder.ToString());
    }
    //--------------------------------------
    //  GET/SET
    //--------------------------------------

    //--------------------------------------
    //  EVENTS
    //--------------------------------------

    public void onPopUpCallBack(string buttonIndex)
    {
        int index = System.Convert.ToInt16(buttonIndex);

        switch (index)
        {
        case 0:
            MNIOSNative.RedirectToAppStoreRatingPage(appleId);
            OnComplete(MNDialogResult.RATED);
            break;

        case 1:
            OnComplete(MNDialogResult.REMIND);
            break;

        case 2:
            OnComplete(MNDialogResult.DECLINED);
            break;
        }



        Destroy(gameObject);
    }
    //--------------------------------------
    //  PUBLIC METHODS
    //--------------------------------------


    public void init()
    {
        MNIOSNative.showRateUsPopUP(title, message, rate, remind, declined);
    }
    //--------------------------------------
    //  PUBLIC METHODS
    //--------------------------------------

    public void init()
    {
        MNIOSNative.showMessage(title, message, ok);
    }
    //--------------------------------------
    //  PUBLIC METHODS
    //--------------------------------------

    public void init()
    {
        MNIOSNative.showDialog(title, message, yes, no);
    }