public string GetCardPrefabNameByType(Constants.CardType type) { string result = ""; switch (type) { case Constants.CardType.Soul: result = GlobalSettings._globalSettings.creatureCard.name; break; case Constants.CardType.Spell: result = GlobalSettings._globalSettings.spellCard.name; break; case Constants.CardType.Player: result = GlobalSettings._globalSettings.playerCard.name; break; case Constants.CardType.Support: result = GlobalSettings._globalSettings.supportCard.name; break; } return(result); }
public static List <CardVisual> FindAllCardsOfType(CardType type, DeckType zone = DeckType.None) { List <CardVisual> cardsToSearch = new List <CardVisual>(); if (zone == DeckType.None) { cardsToSearch = Deck._allCards.activeCards; } else { cardsToSearch = FindAllCardsInZone(zone); } List <CardVisual> sortedcards = new List <CardVisual>(); for (int i = 0; i < cardsToSearch.Count; i++) { if (cardsToSearch[i].primaryCardType == type) { sortedcards.Add(cardsToSearch[i]); } } return(sortedcards); }
public static List <CardVisual> FindAllCardsOfType(CardType type, DeckType zone, OwnerConstraints ownerConstraints) { List <CardVisual> cards = FindAllCardsOfType(type, zone); List <CardVisual> sortedcards = SortCardsByOwner(cards, ownerConstraints); return(sortedcards); }
public CardVisual SpawnCopy(CardVisual target) { spawnCardType = target.primaryCardType; CardData tokenData = Resources.Load <CardData>("CardData/" + target.cardData.name) as CardData; CardVisual tokenCard = SpawnBaseToken(tokenData, GetCardPrefabName(spawnCardType)); //Debug.Log(tokenCard.cardData.cardName + " is being copied"); return(tokenCard); }
public static bool CardHasPrimaryType(CardVisual card, CardType type) { return(card.primaryCardType == type); }
public static List <CardVisual> FindAllCardsInZone(DeckType zone, Keywords keyWord, OwnerConstraints ownerConstraints, CardType cardType) { List <CardVisual> cards = FindAllCardsInZone(zone, keyWord, ownerConstraints); List <CardVisual> sortedCards = FindAllCardsOfType(cards, cardType); return(sortedCards); }
public static List <CardVisual> FindAllCardsOfType(List <CardVisual> cardsToSearch, CardType type) { List <CardVisual> results = new List <CardVisual>(); for (int i = 0; i < cardsToSearch.Count; i++) { if (cardsToSearch[i].primaryCardType == type) { results.Add(cardsToSearch[i]); } } return(results); }
protected string GetCardPrefabName(Constants.CardType cardType) { return(Deck._allCards.GetCardPrefabNameByType(cardType)); }