Made it so that buildings are not counted in the total population count, and that the player can still place those, even when the maximum population has been reached.

This commit is contained in:
MaximilienBlanchardBizien1 2024-09-24 10:50:46 -04:00
parent 932aeb6e82
commit 1fd249a0d2

View File

@ -39,11 +39,11 @@ public class Ally : Entity
public override void LevelStart()
{
base.LevelStart();
ResourceManager.Instance.CurrentPopulation += PopulationCost;
if(this is not Building) ResourceManager.Instance.CurrentPopulation += PopulationCost;
}
public override void LevelDestroy()
{
base.LevelDestroy();
ResourceManager.Instance.CurrentPopulation -= PopulationCost;
base.LevelDestroy();
if (this is not Building) ResourceManager.Instance.CurrentPopulation -= PopulationCost;
}
}