Ejemplo n.º 1
0
 public void Buy()
 {
     if (selected == -1)
     {
         bubbleText.Text = $"Here is your {food.Name}.\nIt's a pleasure doing business with you.";
         buyButton.Hide();
         // Buy food
         food.Effect();
         GameData.Instance.LeftInShop.Remove(food.Id);
         GameData.Instance.Money -= food.Price;
         SetFood(FoodId.None);
     }
     else
     {
         CardData card = GetCard(selected).Data();
         bubbleText.Text = $"Here is your {card.Name}.\nIt's a pleasure doing business with you.";
         buyButton.Hide();
         // Buy card
         GameData.Instance.Deck.Add(card.Id);
         GameData.Instance.DeckChange();
         GameData.Instance.Money -= card.MonPrice;
         SetCard(CardId.None, selected);
     }
 }