2023-08-18 01:03:41 +02:00
|
|
|
using System.Collections;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using UnityEngine;
|
|
|
|
using UnityEngine.Assertions;
|
|
|
|
|
|
|
|
public class AppManager : MonoBehaviour
|
|
|
|
{
|
2023-08-22 04:15:05 +02:00
|
|
|
public static void LoadScene(int index)
|
2023-08-18 01:03:41 +02:00
|
|
|
{
|
|
|
|
UnityEngine.SceneManagement.SceneManager.LoadScene(index);
|
|
|
|
}
|
|
|
|
|
|
|
|
public List<GameObject> UI_Groups = new List<GameObject>();
|
|
|
|
public void ShowAndHide(int showIndex)
|
|
|
|
{
|
|
|
|
Assert.IsTrue(showIndex < UI_Groups.Count);
|
|
|
|
|
|
|
|
foreach (GameObject group in UI_Groups)
|
|
|
|
{
|
|
|
|
group.SetActive(false);
|
|
|
|
}
|
|
|
|
|
|
|
|
UI_Groups[showIndex].SetActive(true);
|
|
|
|
}
|
|
|
|
|
|
|
|
public void QuitApp()
|
|
|
|
{
|
|
|
|
Application.Quit();
|
|
|
|
}
|
|
|
|
}
|