Beispiel #1
0
 public void SendPoints(int days)
 {
     allPoints.AddTechnology(addTechnology * days);
     allPoints.AddScience(addScience * days);
     allPoints.AddArmy(addArmy * days);
     allPoints.AddPopulation(addPopulation * days);
     allPoints.AddNature(addNature * days);
     allPoints.AddPower(addEnergy * days);
     allPoints.Addfood(addFood * days);
     allPoints.AddWater(addWater * days);
 }
Beispiel #2
0
 public void RemovePoints(bool Continue)
 {
     if (!Continue)
     {
         if (allPoints.money >= moneyRequired)
         {
             allPoints.AddPopulation(pop);
             allPoints.AddNature(nat);
             allPoints.AddPower(power);
             allPoints.Addfood(food);
             allPoints.AddMoney(-moneyRequired);
             EnablePanel(false);
         }
     }
     else
     {
         allPoints.AddPopulation(pop);
         allPoints.AddNature(nat);
         allPoints.AddPower(power);
         allPoints.Addfood(food);
     }
 }
Beispiel #3
0
 public void BuyCompany(int number)
 {
     if (requirement.requirement == "")
     {
         musicController.CoinSound();
         allPoints.money -= CompanyValue;
         NumberOfCompany += number;
         CompanyValue    += SetCompanyValue;
         PlayerPrefs.SetInt("NatureCompanieValue", CompanyValue);
         allPoints.AddPopulation((int)(afectPopulation * PlayerPrefs.GetFloat("Difficult")));
         allPoints.AddWater((int)(afectWater * PlayerPrefs.GetFloat("Difficult")));
         allPoints.AddNature(afectNature);
     }
     else
     {
         musicController.ClickSound();
         errorMessage.Instantiate(requirement.requirement, 6);
     }
 }
 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);
     }
 }