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

public class MainMenu : MonoBehaviour
{
    public GameObject mainMenu;
    public GameObject creditsMenu;
    public GameObject tutorialMenu;
    public GameObject player;
    private EnemyAudioHandler _audioHandler;

    // Start is called before the first frame update
    void Start()
    {
        _audioHandler = GetComponent<EnemyAudioHandler>();
        MainMenuButton();
    }

    public void PlayNowButton()
    {
        _audioHandler.PlayAudio();
        UnityEngine.SceneManagement.SceneManager.LoadScene("JuliaScene");
    }

    public void CreditsButton()
    {
        _audioHandler.PlayAudio();
        mainMenu.SetActive(false);
        creditsMenu.SetActive(true);
        player.SetActive(false);
    }

    public void TutorialButton()
    {
        _audioHandler.PlayAudio();
        mainMenu.SetActive(false);
        tutorialMenu.SetActive(true);
        player.SetActive(false);
    }

    public void MainMenuButton()
    {
        _audioHandler.PlayAudio();
        mainMenu.SetActive(true);
        creditsMenu.SetActive(false);
        tutorialMenu.SetActive(false);
        player.SetActive(true);
    }

    public void QuitButton()
    {
        _audioHandler.PlayAudio();
        Application.Quit();
    }
}