// Update is called once per frame public void ToggleCard(Sprite cardSprite, string name, string description, Sprite contamination, string rarity, string type) { // Populate baseball card // Get card preview picture cardPicture = gameObject.transform.Find("BaseballCard/CardPicture").GetComponent <CardPicture>(); cardPicture.m_Image.sprite = cardSprite; // Get card item name cardTitle = gameObject.transform.Find("BaseballCard/CardTitle").GetComponent <CardTitle>(); cardTitle.m_Title.text = name; // Get card item description cardDescription = gameObject.transform.Find("BaseballCard/CardDescription").GetComponent <CardDescription>(); cardDescription.m_Description.text = description; // Get card contamination cardContamination = gameObject.transform.Find("BaseballCard/Contamination").GetComponent <Quality_Sprite>(); cardContamination.m_Quality.sprite = contamination; // Get card rarity cardRarity = gameObject.transform.Find("BaseballCard/Rarity").GetComponent <Quality_Sprite>(); cardRarity.m_Quality.sprite = Resources.Load <Sprite>(rarity); // Get card type cardType = gameObject.transform.Find("BaseballCard/Type").GetComponent <Quality_Sprite>(); cardType.m_Quality.sprite = Resources.Load <Sprite>(type); // Show baseball card ApparateCard(); }
public bool TestCardContents() { this.WaitTilIsVisible(); if (CardHeader.IsDisplayed() && CardTitle.IsDisplayed() && CardSubTitle.IsDisplayed() && CardContent.IsDisplayed() && CardActions.IsDisplayed()) { return(true); } else { if (!CardHeader.WaitTilIsVisible()) { BRLogger.LogInfo("Card Header is not available"); } if (!CardTitle.WaitTilIsVisible()) { BRLogger.LogInfo("Card Title is not available"); } if (!CardSubTitle.WaitTilIsVisible()) { BRLogger.LogInfo("Card Subtitle is not available"); } if (!CardContent.WaitTilIsVisible()) { BRLogger.LogInfo("Card Content is not available"); } if (!CardActions.WaitTilIsVisible()) { BRLogger.LogInfo("Card Action/s is not available"); } return(false); } }
/** * Helper method. * Shows a Card. */ private void ShowCard() { Card.Show(); CardTitle.Show(); priceLabel.Show(); paymentLabel1.Show(); paymentLabel2.Show(); paymentLabel3.Show(); paymentLabel4.Show(); apartmentCostLabel.Show(); mortgageLabel.Show(); logoBox.Show(); }
/** * Helper method. * Hides a Card. */ private void HideCard() { Card.Hide(); CardTitle.Hide(); priceLabel.Hide(); paymentLabel1.Hide(); paymentLabel2.Hide(); paymentLabel3.Hide(); paymentLabel4.Hide(); apartmentCostLabel.Hide(); mortgageLabel.Hide(); logoBox.Hide(); }
public string getCardHeader() => (CardID > 0 ? $"Card #: {CardID.ToString("0000")}" : "N/A") + $" - {CardTitle.Trim()}" + Environment.NewLine;
public string getCardHeader() => (CardID > 0 ? $"Card #: {CardID:0000}" : "N/A") + $" - {CardTitle.Replace('\u3000',' ').Trim()}";