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


public class WinController : MonoBehaviour {


    private ImortalStorage im;
    public Text scoreText;
	// Use this for initialization
	void Start () {
        im = GameObject.FindGameObjectWithTag("Imortal").GetComponent<ImortalStorage>();
        string s = im.score.ToString();
        scoreText.text = "You Saved " + s;
    
    }
	
	// Update is called once per frame
	void Update () {
		
	}

    public void OnResetButtonClick()
    {
        im.Kill();
        SceneManager.LoadScene(0);
    }
}
