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

public class ButtonManager : MonoBehaviour
{
    public Button[] menuButtons;
    public Button backButton;
    public Text creditsText;
    public GameObject panel;

    // Start is called before the first frame update
    void Start()
    {
        
    }

    // Update is called once per frame
    void Update()
    {
        
    }

    public void ShowCredits()
    {
        foreach (Button menuButton in menuButtons)
        {
            menuButton.gameObject.SetActive(false);
        }

        backButton.gameObject.SetActive(true);
        creditsText.gameObject.SetActive(true);
    }

    public void ShowMenu()
    {
        foreach (Button menuButton in menuButtons)
        {
            menuButton.gameObject.SetActive(true);
        }

        backButton.gameObject.SetActive(false);
        creditsText.gameObject.SetActive(false);
    }

    public void PlayGame()
    {
        panel.SetActive(true);
    }
}
