31 lines
836 B
C#
31 lines
836 B
C#
using UnityEngine;
|
|
using System.Collections;
|
|
|
|
public class ItemViewController : MonoBehaviour {
|
|
public UnityEngine.UI.Image itemImageView;
|
|
public UnityEngine.UI.Text itemEquippedText;
|
|
public UnityEngine.UI.Text itemCountText;
|
|
public UnityEngine.UI.Button itemButton;
|
|
public PickableItem item;
|
|
|
|
// Use this for initialization
|
|
void Start () {
|
|
itemCountText.text = "";
|
|
itemEquippedText.text = "";
|
|
}
|
|
|
|
// Update is called once per frame
|
|
void Update () {
|
|
if (item != null) {
|
|
//itemCountText.text = item.description.IsEquippable && item.equipped ? "E" : "";
|
|
itemEquippedText.text = item.description.IsEquippable && item.equipped ? "E" : "";
|
|
|
|
if (itemImageView != null) {
|
|
itemImageView.sprite = item.inventoryIcon;
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|