23 lines
618 B
C#
23 lines
618 B
C#
|
|
using System.Collections;
|
||
|
|
using System.Collections.Generic;
|
||
|
|
using UnityEngine;
|
||
|
|
|
||
|
|
public class GameStopPanelController : MonoBehaviour
|
||
|
|
{
|
||
|
|
[SerializeField] private GameObject gameStopPanel;
|
||
|
|
[SerializeField] private SettingPanelController settingPanelController;
|
||
|
|
private bool isGameStopping = false;
|
||
|
|
|
||
|
|
private void Update()
|
||
|
|
{
|
||
|
|
if (settingPanelController != null && settingPanelController.IsSettingOpen)
|
||
|
|
return;
|
||
|
|
|
||
|
|
if (Input.GetKeyDown(KeyCode.Escape))
|
||
|
|
{
|
||
|
|
isGameStopping = !isGameStopping;
|
||
|
|
gameStopPanel.SetActive(isGameStopping);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|