Skip to content
Snippets Groups Projects
Commit 0436d884 authored by Matti Loimaranta's avatar Matti Loimaranta
Browse files

changed unnecessary floats to ints

parent daa73c60
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.
Finish editing this message first!
Please register or to comment