Exemple #1
0
 public static void Button()
 {
     if (TTPCore.IncludedServices != null && !TTPCore.IncludedServices.rateUs)
     {
         return;
     }
     Debug.Log("TTPRateUs::Button:");
     if (TTPCore.IsConnectedToTheInternet())
     {
         GoToRateFromButton();
     }
     else
     {
         LogPopUpEvent("rateUsButton", false, false, false, true, "NA");
         InformNoInternet();
     }
 }
Exemple #2
0
        private static bool ShouldSuggestRateUs()
        {
            Debug.Log("TTPRateUs::ShouldSuggestRateUs:");
            if (!TTPCore.IsConnectedToTheInternet())
            {
                LogPopUpEvent("rateUsPopup", false, false, false, true, "NA");
                Debug.Log("TTPRateUs::ShouldSuggestRateUs: not connected to the internet. will not show.");
                return(false);
            }
            if (_neverShow)
            {
                LogPopUpEvent("rateUsPopup", false, true, false, false, "NA");
                Debug.Log("TTPRateUs::ShouldSuggestRateUs: neverShow marked. will not show.");
                return(false);
            }
            if (PlayerPrefs.GetInt(PLAYER_PREFS_NEVER, 0) == 1)
            {
                LogPopUpEvent("rateUsPopup", false, true, false, false, "NA");
                Debug.Log("TTPRateUs::ShouldSuggestRateUs: neverShow marked in persistency. will not show.");
                Never(true);
                return(false);
            }
            if (NextShowTime != null && DateTime.Now.CompareTo(NextShowTime) < 0)
            {
                LogPopUpEvent("rateUsPopup", false, false, true, false, "NA");
                Debug.Log("TTPRateUs::ShouldSuggestRateUs: coolDown has not passed. will not show.");
                return(false);
            }
#if TTP_POPUPMGR
            if (!TTPPopupMgr.ShouldShow("RateUs"))
            {
                Debug.Log("TTPRateUs::ShouldSuggestRateUs: PopupMgr return false. will not show.");
                return(false);
            }
#endif
            return(true);
        }