31 lines
669 B
C#
31 lines
669 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.Assertions;
|
|
|
|
public class AppManager : MonoBehaviour
|
|
{
|
|
public static void LoadScene(int index)
|
|
{
|
|
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();
|
|
}
|
|
}
|