using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class QuizManager : MonoBehaviour { public Text questionText; public GameObject correctPopup; public GameObject wrongPopup; private string currentQuestion; private bool answerIsCorrect; private void Start() { currentQuestion = questionText.text; } public void Answer(bool isCorrect) { if (isCorrect) { ShowCorrectPopup(); } else { ShowWrongPopup(); } } private void ShowCorrectPopup() { correctPopup.SetActive(true); } private void ShowWrongPopup() { wrongPopup.SetActive(true); } public void ClosePopup() { correctPopup.SetActive(false); wrongPopup.SetActive(false); } }