41 lines
764 B
C#
41 lines
764 B
C#
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
public class WelcomePopUp : MonoBehaviour
|
|
{
|
|
[SerializeField]
|
|
private Text closeText;
|
|
|
|
private FScriptsHandler fScriptsHandler;
|
|
|
|
private bool isClose;
|
|
|
|
public void ShowClose()
|
|
{
|
|
isClose = true;
|
|
closeText.enabled = true;
|
|
}
|
|
|
|
public void ClosePopUp()
|
|
{
|
|
fScriptsHandler.m_PlayerMain.firstPersonController.UnFrezzeLook();
|
|
Cursor.visible = false;
|
|
Cursor.lockState = CursorLockMode.Locked;
|
|
Object.Destroy(base.gameObject);
|
|
}
|
|
|
|
private void Start()
|
|
{
|
|
fScriptsHandler = Object.FindObjectOfType<FScriptsHandler>();
|
|
}
|
|
|
|
private void Update()
|
|
{
|
|
if (isClose && Input.anyKeyDown)
|
|
{
|
|
FScriptsHandler.Instance.m_PlayerMain.firstPersonController.UnFrezzeLook();
|
|
Object.Destroy(base.gameObject);
|
|
}
|
|
}
|
|
}
|