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

public class LoadingManager : MonoBehaviour
{
    public GameObject LoadingScreen;
    public GameObject TutorialScreen;
    public GameObject GameScreen;

    private bool launched = false;
    private bool game = false;

    void Start() {
        LoadingScreen.GetComponent<Canvas>().enabled = true;
        TutorialScreen.GetComponent<Canvas>().enabled = false;
        GameScreen.GetComponent<Canvas>().enabled = false;
    }

    public void LaunchTutorial() {
        if (!launched) {
        LoadingScreen.GetComponent<Canvas>().enabled = false;
        TutorialScreen.GetComponent<Canvas>().enabled = true;
        launched = true;
        }
    }

    public void LaunchGame() {
        if (!game) {
            TutorialScreen.GetComponent<Canvas>().enabled = false;
            GameScreen.GetComponent<Canvas>().enabled = true;
            game = true;
        }
    }

    public void LeaveApp() {
        Application.Quit();
    }
}
