コード例 #1
0
 private void AttemptPlaceDefender(Vector2 gridPos)
 {
     if (currentDefender)
     {
         var defenderCost = currentDefender.GetStarCost();
         if (starDisplay.CanSpendStars(defenderCost))
         {
             starDisplay.SpendStars(defenderCost);
             SpawnDefender(gridPos);
         }
     }
 }