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

public class IntroManager : MonoBehaviour {
    public GameObject logo;
    public GameObject forth;
    Animator anim;

    bool hidLogo = false;

	// Use this for initialization
	void Start () {
        anim = GetComponent<Animator>();
	}
	
	// Update is called once per frame
	void Update () {
        if (Input.GetKeyUp(KeyCode.Space))
        {
            if (!hidLogo)
            {
                logo.SetActive(false);
                //forth.SetActive(false);
                anim.SetTrigger("scroll");
                hidLogo = true;
            }
            else
            {
                Scene current = SceneManager.GetActiveScene();
                int next = current.buildIndex + 1;

                SceneManager.LoadScene(next);
            }
        }
    }
}
