Skip to content
Snippets Groups Projects
Commit d44a5a6c authored by Tuisku Polvinen's avatar Tuisku Polvinen
Browse files

Merge branch 'master' of https://gitlab.utu.fi/eolokk/game_jam19

parents 9d29d669 0436d884
No related branches found
No related tags found
No related merge requests found
......@@ -88,7 +88,7 @@ public class City : MonoBehaviour
lista[i].SetCapacity(x);
}
}
public void UseResources(List<float> a)
public void UseResources(List<int> a)
{
}
......
......@@ -21,7 +21,7 @@ public class ResourceCapacityUpgrade : Upgrade
UpgradeTargets target = UpgradeTargets.capacity;
City city = gameObject.GetComponent<City>();
int currentLevel = city.GetLevel(target);
city.UseResources(GetPrices(currentLevel));
city.UseResources((GetPrices(currentLevel)));
city.IncreaseCapacity(currentLevel * 100);
Debug.Log("Capacity upgraded");
}
......
......@@ -58,14 +58,13 @@ public abstract class Upgrade : MonoBehaviour
}
public List<float> GetPrices(float modifier)
public List<int> GetPrices(float modifier)
{
List<float> prices = new List<float>();
List<int> prices = new List<int>();
foreach(KeyValuePair<Resources, int> key in resources)
{
prices.Add(key.Value * modifier * 50 * GetEfficiency());
prices.Add((int) (key.Value * modifier * 50 * GetEfficiency()));
}
return prices;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment