sync some updates

This commit is contained in:
2026-06-03 14:26:45 +02:00
parent 5911b2c981
commit fdba7bca09
7 changed files with 172 additions and 1261 deletions
+8 -1
View File
@@ -15,7 +15,7 @@ public class UpgradeManager : MonoBehaviour
HitBonus
}
struct CardDefinition
public struct CardDefinition
{
public UpgradeCard.UpgradeType type;
public string title;
@@ -843,6 +843,13 @@ public class UpgradeManager : MonoBehaviour
return IsTeslaTowerSelected() ? TeslaCards : CannonCards;
}
public static IEnumerable<CardDefinition> GetCardsForTower(string towerId)
{
CardDefinition[] cards = towerId == TeslaTowerId ? TeslaCards : CannonCards;
foreach (CardDefinition card in cards)
yield return card;
}
static bool IsTeslaTowerSelected()
{
return PlayerPrefs.GetString(SelectedTowerKey, "cannon") == TeslaTowerId;