literally half of the game
This commit is contained in:
parent
1590b5faa6
commit
b842289076
77 changed files with 11904 additions and 72 deletions
29
Assets/Scripts/UIHandler.cs
Normal file
29
Assets/Scripts/UIHandler.cs
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
using UnityEngine;
|
||||
|
||||
public class UIHandler : MonoBehaviour
|
||||
{
|
||||
public GameObject mainHUD;
|
||||
|
||||
public void OpenUI(UIObject targetUI)
|
||||
{
|
||||
if (targetUI.willCloseMainUI && mainHUD.activeSelf)
|
||||
{
|
||||
mainHUD.SetActive(false);
|
||||
}
|
||||
targetUI.gameObject.SetActive(true);
|
||||
}
|
||||
|
||||
public void CloseUI(UIObject targetUI)
|
||||
{
|
||||
if (!mainHUD.activeSelf)
|
||||
{
|
||||
mainHUD.SetActive(true);
|
||||
}
|
||||
targetUI.gameObject.SetActive(false);
|
||||
}
|
||||
|
||||
public void ExitGame()
|
||||
{
|
||||
//LevelSwitcher.instance.SwitchMenu(0); //replace with main menu
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue