Esempio n. 1
0
 public void BuyCompany(int number)
 {
     if (requirement.requirement == "")
     {
         musicController.CoinSound();
         allPoints.AddTechnologyLimit(itenLimit);
         allPoints.money -= CompanyValue;
         NumberOfCompany += number;
         CompanyValue    += SetCompanyValue;
         allPoints.AddTechnology(afectTechnology);
         PlayerPrefs.SetInt("TechnologyCompanieValue", CompanyValue);
         allPoints.AddPopulation((int)(afectPopulation * PlayerPrefs.GetFloat("Difficult")));
         allPoints.AddNature((int)(afectNature * PlayerPrefs.GetFloat("Difficult")));
         allPoints.AddPower((int)(afectEnergy * PlayerPrefs.GetFloat("Difficult")));
     }
     else
     {
         musicController.ClickSound();
         errorMessage.Instantiate(requirement.requirement, 0);
     }
 }