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(); } }); }
//-------------------------------------- // GET/SET //-------------------------------------- //-------------------------------------- // EVENTS //-------------------------------------- public void onPopUpCallBack(string buttonIndex) { int index = System.Convert.ToInt16(buttonIndex); switch (index) { case 0: MNAndroidNative.RedirectStoreRatingPage(url); dispatch(BaseEvent.COMPLETE, MNDialogResult.RATED); break; case 1: dispatch(BaseEvent.COMPLETE, MNDialogResult.REMIND); break; case 2: dispatch(BaseEvent.COMPLETE, MNDialogResult.DECLINED); break; } Destroy(gameObject); }