public void OnAdsFinish()
    {
        adsRoll = true;
        summonedAnimator.SetBool("Summon", false);

        this.Invoke("SummonGacha", 0.5f);

        hasReroll = false;
        GameConfig.CheckFreeSkin();
        GameManager.instance.playerData.SaveData();
    }
Example #2
0
    private void OnEnable()
    {
        leaderboardButton.SetActive(!GameSceneManager.instance.noInternet);

        if (GameManager.instance.playerData.matchPlayed == 0)
        {
            GameManager.instance.AFTrackRichEvent("af_tutorial_completion");
        }

        string rewardText = GameConfig.CheckFreeSkinFromMatchPlayed();

        if (!rewardText.Equals(""))
        {
            rewardtab.GetComponent <TabMovment>().SetTextInTab(rewardText);
            rewardtab.SetActive(true);
        }

        GameManager.instance.AFTrackRichEvent("sendScore", null, (long)Mathf.Round(GameSceneManager.instance.scoreManager.scoreCount));

        LeaderboardController.instance.UpdateHighScore((long)Mathf.Round(GameSceneManager.instance.scoreManager.scoreCount));

        //topUpBanner.SetActive(!GameManager.instance.CheckGachaAvailability());
        gachaBanner.SetActive(GameManager.instance.CheckGachaAvailability());

        earnCoinContainer.SetActive(false);
        innerAdsBanner.SetActive(true);
        adsButton.SetActive(true);

        GameSceneManager.instance.currentAdsCoin = Random.Range(30, 100);
        GameManager.instance.playerData.matchPlayed++;
        GameConfig.CheckFreeSkin();
        GameManager.instance.playerData.SaveData();

        currentScore.text = ((long)Mathf.Round(GameSceneManager.instance.scoreManager.scoreCount)).ToString();
        hiScore.text      = LocalizedString.GetString("best") + " " + LeaderboardController.instance.playerHighScore.ToString();
        todayScore.text   = LocalizedString.GetString("today") + " " + LeaderboardController.instance.playerHighScoreDaily.ToString();
    }
Example #3
0
    public void ToggleDeathMenuAds(bool canContinue, bool isAdsReady)
    {
        pc.pause = canContinue;

        heartAds.SetActive(isAdsReady);
        coinAds.SetActive(isAdsReady);

        if (canContinue)
        {
            this.canContinue = false;
            BackButtonManager.instance.SetCurrentScreen("revive");
            pc.pause = true;
            reviveMenu.SetActive(true);
        }
        else
        {
            BackButtonManager.instance.SetCurrentScreen("death");

            pc.pause = false;
            Invoke("ShowDeathMenu", 3f);
        }

        GameConfig.CheckFreeSkin(Mathf.RoundToInt(scoreManager.scoreCount));
    }