41 lines
804 B
C#
41 lines
804 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.SceneManagement;
|
|
using UnityEngine.UI;
|
|
|
|
public class MainMenu : MonoBehaviour {
|
|
|
|
public GameObject settingPanel;
|
|
public GameObject gameName;
|
|
|
|
[SerializeField] private Button startButton;
|
|
|
|
private void Start()
|
|
{
|
|
startButton.onClick.AddListener(StartGame);
|
|
}
|
|
|
|
private void StartGame()
|
|
{
|
|
Load.Loader(SceneName.Level_One);
|
|
Time.timeScale = 1;
|
|
}
|
|
|
|
public void SettingsOpen()
|
|
{
|
|
settingPanel.SetActive(true);
|
|
gameName.SetActive(false);
|
|
}
|
|
|
|
public void SettingsClose()
|
|
{
|
|
settingPanel.SetActive(false);
|
|
gameName.SetActive(true);
|
|
}
|
|
public void QuitGame()
|
|
{
|
|
Application.Quit();
|
|
}
|
|
}
|