Exemplo n.º 1
0
    public static void CompleteTutorial(TutorialData tutData, int seeTime = 1)
    {
        if (!HasSeenTutorial(tutData))
        {
            if (!data.finishedTutorials.ContainsKey(tutData.Id))
            {
                data.finishedTutorials.Add(tutData.Id, 0);
            }
            data.finishedTutorials[tutData.Id] += 1;
            if (!cacheHasSeenTutorial.ContainsKey(tutData.Id))
            {
                cacheHasSeenTutorial.Add(tutData.Id, 0);
            }
            cacheHasSeenTutorial[tutData.Id] = data.finishedTutorials[tutData.Id];
            TutorialManager.activeTutorials.Remove(tutData.Id);

            if (tutData.saveOnDone)
            {
                TutorialManager.Save();
            }
            isShowing = false;
            onCompleteTutorial?.Invoke(tutData);
            FirebaseManager.LogEvent($"Tutorial_Done_{tutData.Id}");
        }
    }
Exemplo n.º 2
0
    public static void ShowError(string msg, string placementName)
    {
        string text = string.Format("There was a problem displaying this ads. {0}. Please try again later.", msg);

        //Manager.Add(PopupController.POPUP_SCENE_NAME, new PopupData(PopupType.OK, text));
        Manager.Add(PopupWithImageController.POPUP_SCENE_NAME, new PopupWithImageData(PopupType.OK, text).SetImagePath(Const.DIALOG_ICON_OPPS_PATH));
        FirebaseManager.LogEvent($"AdsError_{placementName}", "message", msg);
    }
Exemplo n.º 3
0
        public void OnShare()
        {
            FirebaseManager.LogEvent("share_button_click");
            var share = new NativeShare();

            share.SetSubject(FrameworkValues.ShareSubject);
            share.SetText(FrameworkValues.ShareText + "\n" + "https://play.google.com/store/apps/details?id=" + Application.identifier);
            share.Share();
        }
Exemplo n.º 4
0
 public void LogClick(bool isOn)
 {
     if (isOn)
     {
         FirebaseManager.LogEvent(eventName);
     }
     else
     {
         FirebaseManager.LogEvent(eventName_ToggleOff);
     }
 }
Exemplo n.º 5
0
 public void OnClick()
 {
     if (isUnlocked)
     {
         onClick?.Invoke(this, stageID);
     }
     else
     {
         SS.View.Manager.Add(PopupController.POPUP_SCENE_NAME, new PopupData(PopupType.OK, "You have to complete previous levels to unlock this."));
     }
     FirebaseManager.LogEvent("StageSelect_StageClick", "stage_number", stageID);
 }
 public void RewardGetHint()
 {
     FirebaseManager.LogEvent("GetHint_RewardGetHint_BtnClick");
     AdsManager.Reward((bool success) =>
     {
         if (success)
         {
             User.AddHint(1);
             Manager.Add(ReceiveItemController.RECEIVEITEM_SCENE_NAME, new PopupData(PopupType.OK, "+1", "You received a hint!"));
         }
     }, AdPlacementType.Reward_GetMoreHint);
 }
Exemplo n.º 7
0
    private void Start()
    {
        switch (m_Type)
        {
        case Type.LogEvent:
            FirebaseManager.LogEvent(eventName);
            break;

        case Type.ScreenName:
            FirebaseManager.LogScreenView(eventName, screenClass);
            break;
        }
    }
 public void BuyHint()
 {
     FirebaseManager.LogEvent("GetHint_IAPBuyHint_BtnClick");
     InAppPurchaseHelper.instance.BuyProduct(IAPProcessor.get_10_hints, (bool success, PurchaseProcessingResult result, string productID) =>
     {
         if (success)
         {
             FirebaseManager.LogEvent("GetHint_IAPBuyHint_Success");
             Manager.Add(ReceiveItemController.RECEIVEITEM_SCENE_NAME, new PopupData(PopupType.OK, "+10", "Purchase successful! You got 10 hints."));
         }
         else
         {
             FirebaseManager.LogEvent("GetHint_IAPBuyHint_Failed");
             Manager.Add(PopupController.POPUP_SCENE_NAME, new PopupData(PopupType.OK, $"There was a problem processing {productID}, please contact the developer."));
         }
     });
 }
    public static AndroidNotificationIntentData CheckOpen()
    {
        var notificationIntentData = AndroidNotificationCenter.GetLastNotificationIntent();

        if (notificationIntentData != null)
        {
            switch (notificationIntentData.Id)
            {
            case Const.NOTI_REPEAT_ID_DAY_2:
                FirebaseManager.LogEvent("Noti_Open_Day_2", "open_time", $"{DateTime.Now.Hour}:{DateTime.Now.Minute}");
                break;

            case Const.NOTI_REPEAT_ID_DAY_4:
                FirebaseManager.LogEvent("Noti_Open_Day_4", "open_time", $"{DateTime.Now.Hour}:{DateTime.Now.Minute}");
                break;

            case Const.NOTI_REPEAT_ID_DAY_6:
                FirebaseManager.LogEvent("Noti_Open_Day_6", "open_time", $"{DateTime.Now.Hour}:{DateTime.Now.Minute}");
                break;
            }
            NotificationHelper.CancelDisplayed(notificationIntentData.Id);
        }
        return(notificationIntentData);
    }
Exemplo n.º 10
0
        public void Show()
        {
            if (!MainManager.Instance.ownInterstitial.showInterstitial)
            {
                return;
            }

            FirebaseManager.LogEvent("show_own_interstitial");

            var data = MainManager.Instance.ownInterstitial.data;

            iconImage.sprite     = MainManager.Instance.ownInterstitial.interstitialTexture;
            titleText.text       = data.title;
            descriptionText.text = data.description;

            installButton.onClick.RemoveAllListeners();
            installButton.onClick.AddListener(delegate
            {
                Application.OpenURL(data.storeURL);
                CloseOwnInterstitial();
            });

            gameObject.SetActive(true);
        }
Exemplo n.º 11
0
 public void LogClick()
 {
     FirebaseManager.LogEvent(eventName);
 }
Exemplo n.º 12
0
 public void OnMoreGames()
 {
     FirebaseManager.LogEvent("more_games_button_click");
     Application.OpenURL(FrameworkValues.MORE_GAMES_LINK);
 }
Exemplo n.º 13
0
 void LogEvent(string eventName)
 {
     FirebaseManager.LogEvent(eventName);
 }
 static void LogError(string msg)
 {
     Debug.LogError(msg);
     FirebaseManager.LogEvent("IAP_Error", "message", msg);
 }
Exemplo n.º 15
0
 void OnGivingReview()
 {
     FirebaseManager.LogEvent($"Rate_Rated_{rateSlider.value}");
     PlayerPrefs.SetInt(Const.PREF_HAS_REVIEWED, 1);
     Manager.Close();
 }
Exemplo n.º 16
0
    static void LogEvent(string message, string param, string value)
    {
#if FIREBASE
        FirebaseManager.LogEvent($"UnityAds_{message}", param, value);
#endif
    }
Exemplo n.º 17
0
 public void SendTestEvent()
 {
     FirebaseManager.LogEvent("TEST_EVENT");
 }