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

[System.Serializable]
public class Question
{
    public string question;
    public string[] answers;
    public int good_answer;
    public int type;
}

[System.Serializable]
public class Questions
{
    public Question[] questions;
}

public class QuizzManager : MonoBehaviour
{
    public GameObject LauncherScreen;
    public GameObject GameScreen;
    public GameObject Question1;
    public GameObject Question2;
    public GameObject Question3;

    void Start()
    {
        LauncherScreen.GetComponent<Canvas>().enabled = true;
        GameScreen.GetComponent<Canvas>().enabled = false;
        Question1.GetComponent<Canvas>().enabled = true;
        Question2.GetComponent<Canvas>().enabled = false;
        Question3.GetComponent<Canvas>().enabled = false;
    }

    public void LaunchGame() {
        LauncherScreen.GetComponent<Canvas>().enabled = false;
        GameScreen.GetComponent<Canvas>().enabled = true;
    }

    public void LeaveQuizz() {
        
    }

    public void ToQuestion2() {
        Question1.GetComponent<Canvas>().enabled = false;
        Question2.GetComponent<Canvas>().enabled = true;
    }

    public void ToQuestion3() {
        Question2.GetComponent<Canvas>().enabled = false;
        Question3.GetComponent<Canvas>().enabled = true;
    }

    public void ToHome() {
        LauncherScreen.GetComponent<Canvas>().enabled = true;
        GameScreen.GetComponent<Canvas>().enabled = false; 
    }
}
