Exemplo n.º 1
0
 public void BuyRedPrincess()
 {
     if (coinscollected < 500)
     {
         NotEnufPanel.SetActive(true);
     }
     else
     {
         coinscollected = coinscollected - 500;
         PlayerPrefs.SetInt("coinscollected", coinscollected);
         PlayerPrefs.SetInt("beli2", 1);
         BUYPrincessRed.SetActive(false);
     }
 }
Exemplo n.º 2
0
    // Start is called before the first frame update
    void Start()
    {
        //CHECK BELI KE TAK!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

        beli1 = PlayerPrefs.GetInt("beli1");
        beli2 = PlayerPrefs.GetInt("beli2");
        beli3 = PlayerPrefs.GetInt("beli3");
        beli4 = PlayerPrefs.GetInt("beli4");
        beli5 = PlayerPrefs.GetInt("beli5");
        beli6 = PlayerPrefs.GetInt("beli6");
        beli7 = PlayerPrefs.GetInt("beli7");



        if (beli1 == 1)
        {
            BUYHornedBeeCheck.SetActive(false);
        }
        if (beli2 == 1)
        {
            BUYPrincessRed.SetActive(false);
        }
        if (beli3 == 1)
        {
            BUYDukeEggfly.SetActive(false);
        }
        if (beli4 == 1)
        {
            BUYJesterB.SetActive(false);
        }
        if (beli5 == 1)
        {
            BUYArcher.SetActive(false);
        }
        if (beli6 == 1)
        {
            BUYQueenant.SetActive(false);
        }
        if (beli7 == 1)
        {
            BUYKingB.SetActive(false);
        }
        //
        coinscollected = PlayerPrefs.GetInt("coinscollected");

        tengahpakai = PlayerPrefs.GetInt("tengahpakai");
        PlayerPrefs.SetInt("tengahpakai", tengahpakai);
    }