using UnityEngine;
using System.Collections;

public class FadeInScript : MonoBehaviour {

    public float time;

    private float _timeFading = 0;

	// Use this for initialization
	void Start () {
        GetComponent<Animator>().SetBool("Begin", true);
	}
	
	// Update is called once per frame
	void Update () {

        _timeFading += Time.deltaTime;

        if (_timeFading >= time)
            Destroy(this.gameObject);

	}
}
