Initial Commit (broken due to version update)
This commit is contained in:
parent
74003df84b
commit
3f7b3b7440
3132 changed files with 1103305 additions and 0 deletions
30
Assets/Scripts/SubMenuManager.cs
Normal file
30
Assets/Scripts/SubMenuManager.cs
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class SubMenuManager : MonoBehaviour {
|
||||
|
||||
|
||||
public GameObject[] SubMenus;
|
||||
|
||||
private GameObject _activeSubMenu;
|
||||
|
||||
|
||||
public void ShowMenu(int i)
|
||||
{
|
||||
if (_activeSubMenu != null)
|
||||
_activeSubMenu.SetActive(false);
|
||||
|
||||
_activeSubMenu = SubMenus[i];
|
||||
_activeSubMenu.SetActive(true);
|
||||
}
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
|
||||
ShowMenu(0);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Loading…
Reference in a new issue