using UnityEngine;
using System.Collections;
using UnityEngine.UI;
using Framework.Extensions;

public class ItemsDisplay : MonoBehaviour 
{
    public AlchemistBag bag;

    private Text resourcesText;
    private Text medicineText;
    private Text shadowText;
    private Text destroyText;
    private Text banishText;
    private Text herbText;
    private Text featherText;
    private Text gemText;

	// Use this for initialization
	void Start () 
    {
        this.medicineText = this.transform.RecursivelyFindChild("MedicineCount").GetComponent<Text>();
        this.shadowText = this.transform.RecursivelyFindChild("ShadowCount").GetComponent<Text>();
        this.destroyText = this.transform.RecursivelyFindChild("DestroyCount").GetComponent<Text>();
        this.herbText = this.transform.RecursivelyFindChild("HerbText").GetComponent<Text>();
        this.featherText = this.transform.RecursivelyFindChild("FeatherText").GetComponent<Text>();
        this.gemText = this.transform.RecursivelyFindChild("GemText").GetComponent<Text>();
	}
	
	// Update is called once per frame
	void Update () 
    {
        this.medicineText.text = "x" + bag.medicineCount;
        this.shadowText.text = "x" + bag.invisibilityCount;
        this.destroyText.text = "x" + bag.destroyCount;
        this.herbText.text = "x" + bag.medHerbsCount;
        this.featherText.text = "x" + bag.invDropCount;
        this.gemText.text = "x" + bag.destroyDustCount;
	}
}
