Exemplo n.º 1
0
    private void AttempToPlaceDefenderAt(Vector2 gridPos)
    {
        var coinsDisplay = FindObjectOfType <CoinsDisplay>();
        int defenderCost = defender.GetGoldCost();

        if (coinsDisplay.HaveEnoughCoins(defenderCost))
        {
            SpawnDefender(gridPos);
            coinsDisplay.SpendCoins(defenderCost);
        }
    }
Exemplo n.º 2
0
 public void SetSelectedDefender(Defender defenderToSelect)
 {
     defender     = defenderToSelect;
     defendercost = defender.GetGoldCost();
 }