- added art for house and UI - put population in ResourceManager - create house prefab - added code for adding and removing pop depending on entity - refactor harvesters so they inherit from ally - modify placeholders and buttons so that only units cost population - add events for population and resources changing - add population relative configs to global config - add start resources values to Levels - add debug feature for generating resources for free
14 lines
427 B
C#
14 lines
427 B
C#
public class House : Building
|
|
{
|
|
public float PopulationGiven => GlobalConfig.Instance.Current.populationGivenPerHouse;
|
|
public override void LevelStart()
|
|
{
|
|
ResourceManager.Instance.MaximumPopulation += PopulationGiven;
|
|
base.LevelStart();
|
|
}
|
|
public override void LevelDestroy()
|
|
{
|
|
ResourceManager.Instance.MaximumPopulation -= PopulationGiven;
|
|
base.LevelDestroy();
|
|
}
|
|
} |