Exemplo n.º 1
0
 public int GetBoostersCount(SaveData.BoostersData.BoosterType boosterType)
 {
     for (int i = 0; i < playerData.boosters.Count; i++)
     {
         SaveData.BoostersData data = playerData.boosters[i];
         if (data.type == boosterType)
         {
             return(data.count);
         }
     }
     return(0);
 }
Exemplo n.º 2
0
 public void BuyBoosters(SaveData.BoostersData.BoosterType boosterType, int amount = 1)
 {
     for (int i = 0; i < playerData.boosters.Count; i++)
     {
         SaveData.BoostersData data = playerData.boosters[i];
         if (data.type == boosterType)
         {
             data.count            += amount;
             playerData.boosters[i] = data;
             this.SaveAllData();
             gui.popUpsPanel.shop.UpdateBoosters();
         }
     }
 }
Exemplo n.º 3
0
 public void SetBoosters(int amount, SaveData.BoostersData.BoosterType _type)
 {
     this.rewardAmount = amount;
     this.boosterImage.gameObject.SetActive(true);
     this.coinImage.gameObject.SetActive(false);
     this.boosterCountText.text = this.rewardAmount.ToString();
     this.boosterType           = _type;
     this.type = WheelCellType.Booster;
     if (_type != SaveData.BoostersData.BoosterType.NewSurvivor)
     {
         if (_type == SaveData.BoostersData.BoosterType.KillAll)
         {
             this.boosterImage.set_sprite(DataLoader.gui.multiplyImages.activeBoosters[1]);
         }
     }
     else
     {
         this.boosterImage.set_sprite(DataLoader.gui.multiplyImages.activeBoosters[0]);
     }
 }