예제 #1
0
 public void RegisterUpgradeSignal(PopulationController population)
 {
     int upgradeCost = population.GetUpgradeCost();
     if(population.GetUpgradeCost() <= energy) {
         population.Upgrade();
         SetEnergy(energy - upgradeCost);
     } else {
         Debug.Log("Not enough energy to upgrade.");
     }
 }