コード例 #1
0
    private void SelectTower(int id)
    {
        TowerEntry entry = GetTowerEntry(id);

        if (entry == null)
        {
            return;
        }
        TowerSelected(entry.details);
        selected = entry;
    }
コード例 #2
0
 private void HandleFinance(TowerEntry entry)
 {
     if (levelManager.CheckIfEnoughMoney(entry.details.Price))
     {
         HandleTowerBuyOrSell(-entry.details.Price);
         HandleSound();
     }
     else
     {
         DisplayNotEnoughMoney("Not enough money to buy a tower!");
     }
 }