Skip to content

Instantly share code, notes, and snippets.

@tarukosu
Created November 19, 2017 14:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tarukosu/595023d2201436f30f1ece204675d018 to your computer and use it in GitHub Desktop.
Save tarukosu/595023d2201436f30f1ece204675d018 to your computer and use it in GitHub Desktop.
MenuWindow.cs
using UnityEngine;
public class MenuWindow : MonoBehaviour
{
public MenuPanel MenuPanel;
private bool isOpen;
public void Toggle()
{
if (isOpen)
{
MenuPanel.Close();
}
else
{
MenuPanel.Open();
}
isOpen = !isOpen;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment