jump-game/Jump Game/Assets/Scripts/Menu/Menu_Buttons.cs

74 lines
2.1 KiB
C#
Raw Normal View History

using System;
using System.Collections;
2020-02-19 15:36:37 +00:00
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
2020-02-19 15:36:37 +00:00
public class Menu_Buttons : MonoBehaviour
{
public GameObject MainMenuPanel;
public GameObject OptionMenuPanel;
public GameObject OptionAudioPanel;
public GameObject OptionVideoPanel;
public GameObject OptionControlsPanel;
// Start is called before the first frame update
void Start()
{
MainMenuPanel.SetActive(true);
OptionMenuPanel.SetActive(false);
OptionAudioPanel.SetActive(false);
OptionVideoPanel.SetActive(false);
OptionControlsPanel.SetActive(false);
}
public void ShowMainMenuPanel()
{
MainMenuPanel.SetActive(true);
OptionMenuPanel.SetActive(false);
OptionAudioPanel.SetActive(false);
OptionVideoPanel.SetActive(false);
OptionControlsPanel.SetActive(false);
}
public void ShowOptionMenuPanel()
{
MainMenuPanel.SetActive(false);
OptionMenuPanel.SetActive(true);
OptionAudioPanel.SetActive(false);
OptionVideoPanel.SetActive(false);
OptionControlsPanel.SetActive(false);
}
public void ShowOptionAudio()
{
MainMenuPanel.SetActive(false);
OptionMenuPanel.SetActive(true);
OptionAudioPanel.SetActive(true);
OptionVideoPanel.SetActive(false);
OptionControlsPanel.SetActive(false);
}
public void ShowOptionVideo()
{
MainMenuPanel.SetActive(false);
OptionMenuPanel.SetActive(true);
OptionAudioPanel.SetActive(false);
OptionVideoPanel.SetActive(true);
OptionControlsPanel.SetActive(false);
}
public void ShowOptionControls()
{
MainMenuPanel.SetActive(false);
OptionMenuPanel.SetActive(true);
OptionAudioPanel.SetActive(false);
OptionVideoPanel.SetActive(false);
OptionControlsPanel.SetActive(true);
}
public void StartGame()
{
2020-02-26 12:05:41 +00:00
SceneManager.LoadScene(1);
}
2020-02-24 22:24:19 +00:00
public void ExitGame()
{
Application.Quit();
}
2020-02-19 15:36:37 +00:00
}