コード例 #1
0
    public void satinAL(UrunManager urun)
    {
        int para = AltinKontrol.parayiGetir();

        if (para >= urun.getFiyat())
        {
            //para guncellemesi
            int yenipara = para - urun.getFiyat();

            AltinKontrol.paraGuncelle(yenipara);

            string[] alinanKarakter = urun.getMaterialIsım().Split(' ');

            string[] envanter = PlayerPrefs.GetString("Envanter").Split(' ');

            PlayerPrefs.SetInt(urun.gameObject.name, 1);

            //Envantere yeni karakter ekleniyor
            string EnvanterEski = PlayerPrefs.GetString("Envanter");
            PlayerPrefs.SetString("Envanter", EnvanterEski + " " + alinanKarakter[0]);
        }
        else
        {
            objeYetersizBakiye.SetActive(true);
        }
    }
コード例 #2
0
    //odul veriyoruz.
    private void Reward()
    {
        if (odulid == 1)
        {
            OdulPanel.SetActive(true);
            Random rastSayi  = new Random();
            int    rast_odul = rastSayi.Next(0, 50);
            odulParan.text = "" + rast_odul;
            int coins = AltinKontrol.parayiGetir() + rast_odul;

            AltinKontrol.paraGuncelle(coins);
        }
        else if (odulid == 2)
        {
            OdulPanel.SetActive(true);
            Random rastSayi  = new Random();
            int    rast_odul = rastSayi.Next(0, 50);
            odulParan.text = "" + rast_odul;
            int coins = AltinKontrol.parayiGetir() + rast_odul;
            AltinKontrol.paraGuncelle(coins);
        }

        else if (odulid == 3)
        {
            OdulPanel.SetActive(true);
            Random rastSayi  = new Random();
            int    rast_odul = rastSayi.Next(0, 50);
            odulParan.text = "" + rast_odul;
            int coins = AltinKontrol.parayiGetir() + rast_odul;
            AltinKontrol.paraGuncelle(coins);
        }
    }
コード例 #3
0
 private void Start()
 {
     highScore.text = "" + PlayerPrefs.GetInt("skor");
     goldScore.text = AltinKontrol.parayiGetir() + " AE";
     if (Klon.areObjectsEmpty())
     {
         Klon.nesneleriGetir();
     }
 }
コード例 #4
0
 private void Tamamlandi()
 {
     skorSonuc.text = "SCORE:" + (int)(scoreArttir);
     CoinSonuc.text = "COİNS:" + CoinsArttır;
     coins.text     = "";
     skor.text      = "";
     AltinKontrol.paraGuncelle(CoinsArttır + AltinKontrol.parayiGetir());
     //gameScene.SetActive(false);
     complate.SetActive(true);
     uiSceene.SetActive(false);
 }
コード例 #5
0
 private void Tamamlandi()
 {
     skorSonuc.text = "SCORE:" + (int)(scoreArttir);
     CoinSonuc.text = "COİNS:" + CoinsArttır;
     coins.text     = "";
     skor.text      = "";
     AltinKontrol.paraGuncelle(CoinsArttır + AltinKontrol.parayiGetir());
     //gameScene.SetActive(false);
     complatePanel.SetActive(true);
     KarakterKontrolcü.OyunAktif = false;
     KarakterKontrolcü.OyunBitti = true;
     PlayerPrefs.SetInt("Education", 1);
 }
コード例 #6
0
 private void Update()
 {
     para.text = AltinKontrol.paraText();
 }
コード例 #7
0
 private void Start()
 {
     para.text = AltinKontrol.paraText();
 }