SchoolFightingSimple/Assets/Scripts/AppManager.cs

31 lines
669 B
C#
Raw Permalink Normal View History

2023-08-18 01:03:41 +02:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Assertions;
public class AppManager : MonoBehaviour
{
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();
}
}