using UnityEngine;
using System.Collections;

public class LevelLoader : MonoBehaviour {
    void Update() {
        if (Input.anyKey) {
            Animator animator = GetComponent<Animator>();
            animator.Play("EvilIntro");
            StartCoroutine(LoadAfterAnimation(40));
        }
    }

    public IEnumerator LoadAfterAnimation(int seconds) {
        yield return new WaitForSeconds(seconds);
        Application.LoadLevel("Level");
    }
}
