using UnityEngine;
using System.Collections;
using UnityEngine.UI;

public class TextOverlay : MonoBehaviour {

	private States states;

	// Use this for initialization
	void Start () {
		states = GameObject.Find("Player").GetComponent<States>();
	}
	
	// Update is called once per frame
	void Update () {
		this.GetComponent<Text>().text = "Medicine: " + states.pills +	"\nWater: " + states.water + "\nDaily water: " + states.dailyWater + "\nMoney: $" + states.playerMoney;
	}
}
