MIF_E31230902/Assets/Asset/_Main/Config/Manager/Gameplay/GameplayGUIManager.cs

74 lines
1.6 KiB
C#

using PahlawanEnergi.Quiz;
using System.Collections;
using System.Collections.Generic;
using TMPro;
using UnityEngine;
namespace PahlawanEnergi
{
public class GameplayGUIManager : MonoBehaviour
{
public static GameplayGUIManager instance;
public QuizScreen quizScreen;
public ResultScreen resultScreen;
public PauseScreen pauseScreen;
public GameObject popupMainMenu;
public TextMeshProUGUI levelText;
private void Awake()
{
instance = this;
}
// Start is called before the first frame update
void Start()
{
levelText.text = $"Level {QuizManager.instance.level}";
}
public void OpenQuizScreen()
{
quizScreen.gameObject.SetActive(true);
}
public void OpenResultScreen()
{
resultScreen.gameObject.SetActive(true);
}
public void OpenPauseScreen()
{
pauseScreen.gameObject.SetActive(true);
}
public void ClosePauseScreen()
{
pauseScreen.gameObject.SetActive(false);
}
public void OpenMainMenuPopup()
{
popupMainMenu.gameObject.SetActive(true);
pauseScreen.gameObject.SetActive(false);
}
public void CancelMainMenuPopup()
{
popupMainMenu.gameObject.SetActive(false);
pauseScreen.gameObject.SetActive(true);
}
public void ConfirmMainMenu()
{
GameplayManager.instance.GoToMainMenu();
}
}
}