using UnityEngine;
using System.Collections;

public class Manager : MonoBehaviour 
{
	public int Score=0;
	public GameObject World;

	IEnumerator RemakeGame()
	{
		yield return new WaitForSeconds(.1f);
		GameObject go = Instantiate(World,Vector3.zero,Quaternion.identity)as GameObject;
		go.name = "World";
		Score =0; // starting a new game reset the score
	}
	public void UpdateScore(int amount)
	{
		Score+=amount; //increment the score
		//GameObject.Find("Overlay").GetComponent<Overlay>().UpdateScore(Score); //update the screen
	}
}
