mirror of
https://github.com/DerTyp7/industrialize-unity.git
synced 2025-10-30 12:57:11 +01:00
33 lines
494 B
C#
33 lines
494 B
C#
using UnityEngine;
|
|
|
|
public class Menu : MonoBehaviour
|
|
{
|
|
public string id;
|
|
public bool isOpen = false;
|
|
|
|
public void Open()
|
|
{
|
|
MenuManager.CloseAllMenus();
|
|
gameObject.SetActive(true);
|
|
isOpen = true;
|
|
}
|
|
|
|
public void Close()
|
|
{
|
|
gameObject.SetActive(false);
|
|
isOpen = false;
|
|
}
|
|
|
|
public void Toggle()
|
|
{
|
|
if (isOpen)
|
|
{
|
|
Close();
|
|
}
|
|
else
|
|
{
|
|
Open();
|
|
}
|
|
}
|
|
}
|