Advertisement
Guest User

CardDisplay

a guest
Jan 24th, 2020
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.74 KB | None | 0 0
  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. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement