using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using UnityEngine.UI;
public class GameInitialization : MonoBehaviour {
     GameObject txtGameInfo;
	public Text txtScore;
	public Text txtpName;
	int score;
	// Use this for initialization
	void Start () {
//		txtpName.text = Game.currentGame.profileName;
//		txtScore.text = Game.currentGame.score.ToString ();
//		GamePlay.score = Game.currentGame.score;
        /*txtGameInfo[1].text = Game.currentGame.level.ToString();
        txtGameInfo[2].text = Game.currentGame.hardness;
        txtGameInfo[3].text = Game.currentGame.score.ToString();*/
    
    }
	
	// Update is called once per frame
	void Update () {
		

		//score++;
		//Game.currentGame.score = score;
//		txtGameInfo.GetComponent<Text>().text = "Name: "+Game.currentGame.profileName+"Level:"+ Game.currentGame.level.ToString()+"Hardness:"+ Game.currentGame.hardness+"Score:"+ Game.currentGame.score.ToString();
	}
	public void OnPauseExitClicked()
	{

		SaveLoad.Load ();
		foreach (var item in SaveLoad.myGames) {
			if (item.profileName==Game.currentGame.profileName) {
				item.level = Application.loadedLevel;
				item.score = GamePlay.score;
			}
		}
		SaveLoad.Save (false);
	}
}
