Beispiel #1
0
 public void DropFruit()
 {
     if (stage == "stage5")
     {
         int countEv = UnityEngine.Random.Range(mincountFruit, maxcountFruit);
         Inv.GetHarvestToInventory(countEv, fruitId, "harvest");
         ExpBar.AddExp(countExpiriens);
         if (iterationFruit >= 1)
         {
             iterationFruit--;
             stage = "stage3";
             shangeSprite("stage3");
             stageThree = buffStageThree;
             stageFour  = buffStageFour;
             growing    = true;
         }
         else
         {
             if (stage != "stage6")
             {
                 stage = "stage6";
                 shangeSprite("stage6");
             }
         }
     }
 }
Beispiel #2
0
 public void OnPointerClick(PointerEventData eventData)
 {
     if (Money.money >= this.price && ExpBar.currentCountlvl >= this.level)
     {
         Money.money -= this.price;
         Inv.GetHarvestToInventory(1, this.id, "sead");
         GameObject.Find("Sounds").GetComponent <Sounds>().PlayBuy();
     }
     else
     {
         GameObject.Find("Sounds").GetComponent <Sounds>().PlayFail();
     }
 }
Beispiel #3
0
 public void OnPointerClick(PointerEventData eventData)
 {
     if (Money.money >= this.itemPrice)
     {
         Money.money -= this.itemPrice;
         Inv.GetHarvestToInventory(1, this.id, "fertilizer");
         GameObject.Find("Sounds").GetComponent <Sounds>().PlayBuy();
     }
     else
     {
         GameObject.Find("Sounds").GetComponent <Sounds>().PlayFail();
     }
 }