jump-game/Jump Game/Assets/Scripts/Menu/Menu_Buttons.cs
Christer Warén 1ab4724225 Update
2022-03-30 19:38:03 +03:00

38 lines
835 B
C#

using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
public class Menu_Buttons : MonoBehaviour
{
public GameObject MainMenuPanel;
public GameObject SettingsMenuPanel;
// Start is called before the first frame update
void Start()
{
MainMenuPanel.SetActive(true);
SettingsMenuPanel.SetActive(false);
}
public void ShowMainMenuPanel()
{
MainMenuPanel.SetActive(true);
SettingsMenuPanel.SetActive(false);
}
public void ShowSettingsMenuPanel()
{
MainMenuPanel.SetActive(false);
SettingsMenuPanel.SetActive(true);
}
public void StartGame()
{
SceneManager.LoadScene(1);
}
public void ExitGame()
{
Application.Quit();
}
}