using UnityEngine;
using System.Collections;

public class sceneScore : MonoBehaviour
{

	
	void Start ()
	{
	
	}
	
	
	void Update () 
	{
	
	}
	
	void OnGUI () 
	{
		if (GUI.Button (new Rect(310,80,150,50), "Menu"))
		{
			Application.LoadLevel("menu");
		}
		if (GUI.Button (new Rect(310,150,150,50), "Effacer scores"))
		{
			PlayerPrefs.DeleteAll();
		}	
		if (PlayerPrefs.HasKey("scoreTotal"))
		{
			
			GUI.Label(new Rect(300, 250, 500, 500),"Meilleur score :"+ PlayerPrefs.GetString("joueur")+ " - " 
				+PlayerPrefs.GetInt("scoreTotal"));
		}
		else 
		{
			GUI.Label(new Rect(300, 250, 300, 300),"Pas de meilleur score !");
		}
	}	
}
