SHARE
TWEET

CardDisplay

a guest Jan 24th, 2020 76 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using UnityEngine.UI;
  5.  
  6. public class CardDisplay : MonoBehaviour{
  7.  
  8.     public Card card;
  9.     public Text nameText;
  10.     public Text descriptionText;
  11.     public Image artworkImage;
  12.     public Text manaText;
  13.     public Text attackText;
  14.     public Text defenseText;
  15.     public Text healthText;
  16.  
  17.     void Start()
  18.     {
  19.         nameText.text = card.name;
  20.         descriptionText.text = card.description;
  21.         artworkImage.sprite = card.artwork;
  22.         manaText.text = card.manaCost.ToString();
  23.         attackText.text = card.attack.ToString();
  24.         defenseText.text = card.defense.ToString();
  25.         healthText.text = card.health.ToString();
  26.     }
  27. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top