66 lines
1.8 KiB
C#
66 lines
1.8 KiB
C#
using Adam;
|
||
using System.Collections;
|
||
using System.Collections.Generic;
|
||
using UnityEngine;
|
||
using UnityEngine.UI;
|
||
//============================================================
|
||
//支持中文,文件使用UTF-8编码
|
||
//@author #AUTHOR#
|
||
//@create #CREATEDATE#
|
||
//@company #COMPANY#
|
||
//
|
||
//@description:总控
|
||
//============================================================
|
||
|
||
public class UIManager : MonoSingleton<UIManager>
|
||
{
|
||
public ToolsItemManager ToolsItemManager;
|
||
public MobileTerminalController MobileTerminalController;
|
||
public AssignmentController assignmentController;
|
||
public BottomController bottomCotroller;
|
||
public JobCardController jobCardController;
|
||
public ExitCheckController exitCheckController;
|
||
public Button exitBtn;
|
||
public Button backToToolBtn;
|
||
public Text threeDTip;
|
||
// Use this for initialization
|
||
private void Start()
|
||
{
|
||
exitBtn.onClick.AddListener(() =>
|
||
{
|
||
if (exitCheckController.num_click != 2)
|
||
{
|
||
exitCheckController.ResetPlane();
|
||
exitCheckController.ExitCheckPanel.SetActive(true);
|
||
}
|
||
else
|
||
{
|
||
Application.Quit();
|
||
}
|
||
});
|
||
exitBtn.gameObject.SetActive(false);
|
||
backToToolBtn.onClick.AddListener(BackToTool);
|
||
backToToolBtn.gameObject.SetActive(false);
|
||
DontDestroyOnLoad(this);
|
||
}
|
||
|
||
private void BackToTool()
|
||
{
|
||
SceneLoad.Instance.SceneChange("工具间场景");
|
||
}
|
||
|
||
public void SetThreeDTip(string name)
|
||
{
|
||
if (name == "")
|
||
{
|
||
threeDTip.transform.parent.gameObject.SetActive(false);
|
||
}
|
||
else
|
||
{
|
||
threeDTip.transform.parent.gameObject.SetActive(true);
|
||
threeDTip.text = name;
|
||
|
||
}
|
||
}
|
||
}
|