60 lines
1.5 KiB
C#
60 lines
1.5 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
public class ExitCheckController : MonoBehaviour
|
|
{
|
|
public GameObject ExitCheckPanel;
|
|
public GameObject End;
|
|
public Button QDButton;
|
|
public Button QXButton;
|
|
public Text text_sub;
|
|
public int num_click;
|
|
|
|
// Start is called before the first frame update
|
|
void Start()
|
|
{
|
|
num_click = 0;
|
|
|
|
QDButton.onClick.AddListener(() =>
|
|
{
|
|
num_click++;
|
|
ResetPlane();
|
|
});
|
|
|
|
QXButton.onClick.AddListener(() =>
|
|
{
|
|
num_click = 0;
|
|
ExitCheckPanel.SetActive(false);
|
|
});
|
|
}
|
|
|
|
public void ResetPlane()
|
|
{
|
|
switch (num_click)
|
|
{
|
|
case 0:
|
|
text_sub.text = "是否确认退出检查!!!";
|
|
break;
|
|
case 1:
|
|
text_sub.text = "结束检查后无法重回现场检查,请填写纸质通知单及处理单。";
|
|
break;
|
|
case 2:
|
|
foreach (Toggle item in UIManager.Instance.bottomCotroller.toggles)
|
|
{
|
|
item.isOn = false;
|
|
item.gameObject.SetActive(false);
|
|
if (item.name == "异常记录")
|
|
{
|
|
item.gameObject.SetActive(true);
|
|
item.isOn = true;
|
|
}
|
|
}
|
|
End.SetActive(true);
|
|
ExitCheckPanel.SetActive(false);
|
|
break;
|
|
}
|
|
}
|
|
}
|