Example #1
0
    public void Start()
    {
        //lb
        LB.SetActive(false);
        LB2.SetActive(false);
        //
        if (PlayerPrefs.HasKey("CoinTotal"))
        {
            PlayerPrefs.SetInt("CoinTotal", PlayerPrefs.GetInt("CoinTotal") + PlayerPrefs.GetInt("CoinRun"));
        }
        else
        {
            PlayerPrefs.SetInt("CoinTotal", PlayerPrefs.GetInt("CoinRun"));
        }
        //   CoinText.text = PlayerPrefs.GetInt("CoinTotal").ToString();

        //Achievement

        //Chillar
        if (PlayerPrefs.GetInt("CoinTotal") > 1000)
        {
            AchievementManager.instance.SetAchievementProgress("CW", 1000);
        }
        else
        {
            AchievementManager.instance.SetAchievementProgress("CW", PlayerPrefs.GetInt("CoinTotal"));
        }
        //Gullak
        if (PlayerPrefs.GetInt("CoinTotal") > 10000)
        {
            AchievementManager.instance.SetAchievementProgress("GW", 10000);
        }
        else
        {
            AchievementManager.instance.SetAchievementProgress("GW", PlayerPrefs.GetInt("CoinTotal"));
        }
        //Bank
        if (PlayerPrefs.GetInt("CoinTotal") > 100000)
        {
            AchievementManager.instance.SetAchievementProgress("BW", 100000);
        }
        else
        {
            AchievementManager.instance.SetAchievementProgress("BW", PlayerPrefs.GetInt("CoinTotal"));
        }
        //Tresure
        if (PlayerPrefs.GetInt("CoinTotal") > 1000000)
        {
            AchievementManager.instance.SetAchievementProgress("T", 1000000);
        }
        else
        {
            AchievementManager.instance.SetAchievementProgress("T", PlayerPrefs.GetInt("CoinTotal"));
        }
        // AchievementManager.instance.SetAchievementProgress("CW", PlayerPrefs.GetInt("CoinTotal"));
        // AchievementManager.instance.SetAchievementProgress("GW", PlayerPrefs.GetInt("CoinTotal"));
        // AchievementManager.instance.SetAchievementProgress("BW", PlayerPrefs.GetInt("CoinTotal"));
        // AchievementManager.instance.SetAchievementProgress("T", PlayerPrefs.GetInt("CoinTotal"));
    }
Example #2
0
    public void cutLBpanel()
    {
        LBpanel.SetActive(false);
        LB.SetActive(false);
        LB2.SetActive(false);

        AchievementButton.SetActive(true);
        DailyRewardButton.SetActive(true);
        ShopButton.SetActive(true);
        LeaderBoardButton.SetActive(true);
        SoundButton.SetActive(true);
        CreditButton.SetActive(true);

        MenuP.SetActive(true);
        CoinP.SetActive(true);
        HighCoinP.SetActive(true);
        SoundManagerMainMenu.instance.ButtonSoundPlay();
    }
Example #3
0
    public void LBbuttonClicked()
    {
        LBpanel.SetActive(true);
        LB.SetActive(true);
        LB2.SetActive(true);

        AchievementButton.SetActive(false);
        DailyRewardButton.SetActive(false);
        ShopButton.SetActive(false);
        LeaderBoardButton.SetActive(false);
        SoundButton.SetActive(false);
        CreditButton.SetActive(false);

        MenuP.SetActive(false);
        CoinP.SetActive(false);
        HighCoinP.SetActive(false);
        SoundManagerMainMenu.instance.ButtonSoundPlay();
        ADManager.instance.DisplayInterstitialAfterSomeTime();
        ADManager.instance.DisplayRewardedAfterSomeTime();
    }