33 lines
752 B
C#
33 lines
752 B
C#
using System;
|
|
using BrewMonster.UI;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
namespace BrewMonster.Scripts
|
|
{
|
|
public class ExitTest : MonoBehaviour
|
|
{
|
|
private bool isExitDlgOpen = false;
|
|
private Button btn;
|
|
|
|
private void Start()
|
|
{
|
|
btn = GetComponent<Button>();
|
|
btn.onClick.AddListener(ToggleDlgExit);
|
|
}
|
|
|
|
private void Update()
|
|
{
|
|
if ( Input.GetKeyDown(KeyCode.Escape) )
|
|
{
|
|
ToggleDlgExit();
|
|
}
|
|
}
|
|
|
|
void ToggleDlgExit()
|
|
{
|
|
isExitDlgOpen = !isExitDlgOpen;
|
|
CECUIManager.Instance.GetInGameUIMan().GetDialog( "Win_Message2" ).Show( isExitDlgOpen );
|
|
}
|
|
}
|
|
} |