Firstborn/Assets/Toby Fredson/Modular Dungeon Catacombs -.../Scripts/MenuManager.cs
Schaken-Mods 959e80cf72 assets upload
assets upload description.
2023-03-28 12:16:30 -05:00

26 lines
608 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class MenuManager : MonoBehaviour {
// Changed to GameObject because only the game object of the menu needs to be accessed, you can
// change this to any class that inherits MonoBehaviour
public GameObject optionsMenu;
// Update is called once per frame
void Update ()
{
// Reverse the active state every time escape is pressed
if (Input.GetKeyDown(KeyCode.H))
{
// Check whether it's active / inactive
bool isActive = optionsMenu.activeSelf;
optionsMenu.SetActive(!isActive);
}
}
}