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

public class MenuGameUI : MonoBehaviour
{
    public Animator animator;

    public string mainMenu;
    public string Game1;
    public string Game2;
    public string Game3;
    public string Game4;
    public string Game5;

    IEnumerator TransitionStart(string sceneName)
    {
        animator.SetTrigger("end");
        yield return new WaitForSeconds(1);
        SceneManager.LoadScene(sceneName);
    }

    public void Back()
    {
        SceneManager.LoadScene(mainMenu);
    }

    public void SceneGame1()
    {
        StartCoroutine(TransitionStart(Game1));
    }

    public void SceneGame2()
    {
        StartCoroutine(TransitionStart(Game2));
    }

    public void SceneGame3()
    {
        StartCoroutine(TransitionStart(Game3));
    }

    public void SceneGame4()
    {
        StartCoroutine(TransitionStart(Game4));
    }

    public void SceneGame5()
    {
        StartCoroutine(TransitionStart(Game5));
    }
}
