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

public class Intro : MonoBehaviour
{
    public AudioSource sonidoTeclaSpace;
    private Animator animator;

    void Start()
    {
        animator = GetComponent<Animator>();
    }

    // Update is called once per frame
    void Update()
    {
        if (Input.GetKeyDown(KeyCode.Space))
        {
            Invoke("CargarEscena", 2.5f);
            sonidoTeclaSpace.Play();
            animator.enabled = true;
        }
        
    }

    void CargarEscena()
    {
        SceneManager.LoadScene(1);
    }
}
