evershade/Assets/Scripts/UI/MainMenuUIController.cs

58 lines
1.4 KiB
C#

using UnityEngine;
namespace UI
{
public class MainMenuUIController : MonoBehaviour
{
public GameObject startGameButton;
public GameObject continueButton;
public GameObject settingsButton;
public GameObject quitButton;
public GameObject settingsPanel;
public GameObject multiplayerPanel;
public GameObject newGamePanel;
public GameObject loadGamePanel;
public void OnClick_NewGame()
{
if (newGamePanel.activeSelf)
newGamePanel.SetActive(false);
else
newGamePanel.SetActive(true);
}
public void OnClick_Continue()
{
if (loadGamePanel.activeSelf)
loadGamePanel.SetActive(false);
else
loadGamePanel.SetActive(true);
}
public void OnClick_Exit()
{
Application.Quit();
}
public void OnClick_SettingsPanel()
{
if (settingsPanel.activeSelf)
settingsPanel.SetActive(false);
else
settingsPanel.SetActive(true);
}
public void OnClick_Multiplayer()
{
if (multiplayerPanel.activeSelf)
multiplayerPanel.SetActive(false);
else
multiplayerPanel.SetActive(true);
}
}
}