public void PopulateSpawnerVariables(Card_ScriptableObj newCard)
    {
        dungeonCard = null;
        dungeonCard = newCard;

        numEnemiesToSpawn = 0;
        numEnemiesToSpawn = newCard.CardValue;

        enemySuit = newCard.cardSuit;

        SpawnEnemies();
    }
Example #2
0
    /// <summary>
    /// Attempts to add a dungeon card to the list of dungeon cards stored.
    /// </summary>
    public bool AddDungeonCardToInventory(Card_ScriptableObj dungeonCard)
    {
        if (dungeonCards.Count + 1 <= dungeonCardLimit)
        {
            dungeonCards.Add(dungeonCard);
            //dungeonDeckCallback.Invoke(dungeonCard); // Invoke delegate passing the dungeonCard added to the inventory
            return(true);
        }

        print("Dungeon Card could not be added to the deck, too many cards!");
        return(false);
    }
Example #3
0
 /// <summary>
 /// Remove the chosen dungeon card from the inventory.
 /// </summary>
 public void RemoveDungeonCardFromInventory(Card_ScriptableObj dungeonCard)
 {
     dungeonCards.Remove(dungeonCard);
     print(dungeonCard.name + " removed from inventory");
 }