39 lines
816 B
C#
39 lines
816 B
C#
|
|
using UnityEngine;
|
||
|
|
using UnityEngine.SceneManagement;
|
||
|
|
|
||
|
|
public class MenuActions : MonoBehaviour
|
||
|
|
{
|
||
|
|
public GameObject settingsPanel;
|
||
|
|
public string gameSceneName = "GameScene";
|
||
|
|
|
||
|
|
public void StartGame()
|
||
|
|
{
|
||
|
|
Debug.Log("<color=red>게임 시작 버튼이 눌렸습니다!</color>");
|
||
|
|
// SceneManager.LoadScene(gameSceneName); // 일단 주석 처리
|
||
|
|
}
|
||
|
|
|
||
|
|
public void OpenSettings()
|
||
|
|
{
|
||
|
|
if (settingsPanel != null)
|
||
|
|
{
|
||
|
|
settingsPanel.SetActive(true);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
public void CloseSettings()
|
||
|
|
{
|
||
|
|
if (settingsPanel != null)
|
||
|
|
{
|
||
|
|
settingsPanel.SetActive(false);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
public void ExitGame()
|
||
|
|
{
|
||
|
|
Application.Quit();
|
||
|
|
|
||
|
|
#if UNITY_EDITOR
|
||
|
|
UnityEditor.EditorApplication.isPlaying = false;
|
||
|
|
#endif
|
||
|
|
}
|
||
|
|
}
|