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

public class StartScreen : MonoBehaviour {
    public Material mat;
    private float progress = 0.0f;
    public GameObject text1;
    public GameObject text2;
	// Use this for initialization
	void Awake () {
		mat.SetFloat("_SliceAmount", 0.0f);
	}

    bool disolving = false;
	// Update is called once per frame
	void Update () {

        if (disolving == false && Input.anyKey)
        {
            disolving = true;
            text1.SetActive(false);
            text2.SetActive(false);
        }


        if (progress > 1.0f)
        {
            Destroy(this.gameObject);
        }

	    if(disolving == true)
        {
            progress += 0.01f;
            mat.SetFloat("_SliceAmount", progress);


        }
	}
}
