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

public class KeepScore : MonoBehaviour 
{
	// Score
	public Text score;

	// Track the food
	public Transform food;

	// Remember the start
	public Transform startPoint;

	// Distance
	public float distance;

	void Awake ()
	{
		score = gameObject.GetComponentInChildren<Text> ();

		score.gameObject.SetActive (false);
	}

	public void DisplayScore ()
	{
		distance = (food.position - startPoint.position).magnitude;

		score.gameObject.SetActive (true);
	}
}
