コード例 #1
0
ファイル: GameController.cs プロジェクト: hmuar/darwin
 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.");
     }
 }