Example #1
0
 public void BuyCompany(int number)
 {
     if (requirement.requirement == "")
     {
         musicController.CoinSound();
         allPoints.money -= CompanyValue;
         allPoints.AddPowerLimit(itenLimit);
         NumberOfCompany += number;
         CompanyValue    += SetCompanyValue;
         PlayerPrefs.SetInt("EnergyCompanieValue", CompanyValue);
         allPoints.AddPopulation((int)(afectPopulation * PlayerPrefs.GetFloat("Difficult")));
         allPoints.AddNature((int)(afectNature * PlayerPrefs.GetFloat("Difficult")));
         allPoints.AddPower(afectEnergy);
     }
     else
     {
         musicController.ClickSound();
         errorMessage.Instantiate(requirement.requirement, 7);
     }
 }