using System;
using UnityEngine;
using System.Collections;
using Assets.Scripts;
using UnityEngine.UI;

public class UIController : MonoBehaviour
{
    public Text Distance;
    public Text Score;
    public Text HighScore;
    public Text NbVials;
    public Image Vial1;
    public Image Vial2;
    public Image Vial3;

    private Player _player;

	void Start ()
	{
	    _player = GameObject.FindWithTag("Player").GetComponent<Player>();
	    HighScore.enabled = false;
	}
	
	void Update ()
	{
	    Distance.text = (int.Parse(Distance.text) + 1).ToString();
	    int score = _player.Score + int.Parse(Distance.text) / 5;
	    Score.text = (_player.Score + score).ToString();
	}
}
