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

38 lines
835 B
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;
2022-03-30 16:38:03 +00:00
public GameObject SettingsMenuPanel;
2020-02-19 15:36:37 +00:00
// Start is called before the first frame update
void Start()
{
MainMenuPanel.SetActive(true);
2022-03-30 16:38:03 +00:00
SettingsMenuPanel.SetActive(false);
2020-02-19 15:36:37 +00:00
}
public void ShowMainMenuPanel()
{
MainMenuPanel.SetActive(true);
2022-03-30 16:38:03 +00:00
SettingsMenuPanel.SetActive(false);
2020-02-19 15:36:37 +00:00
}
2022-03-30 16:38:03 +00:00
public void ShowSettingsMenuPanel()
2020-02-19 15:36:37 +00:00
{
MainMenuPanel.SetActive(false);
2022-03-30 16:38:03 +00:00
SettingsMenuPanel.SetActive(true);
2020-02-19 15:36:37 +00:00
}
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
}