YanCheng_Metrology/Assets/Scripts/CXX/Devices/直接接入式电能计量装置/Device_NamePlate.cs

57 lines
1.5 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
/// <summary>
/// 直接接入式电能计量装置_铭牌
/// </summary>
public class Device_NamePlate : Device_Base
{
/// <summary>
/// 是否检查
/// </summary>
public bool isChecked;
/// <summary>
/// 核对和抄录UI
/// </summary>
private GameObject checkUiPrefb;
private ProcessTipPanel processTipPanel;
private void OnMouseDown()
{
if (!isChecked)
{
//核对和记录
if (checkUiPrefb == null)
{
checkUiPrefb = Resources.Load<GameObject>("UI/UI_Tip/ProcessTipPanel");
}
if (processTipPanel == null)
{
GameObject tip = Instantiate<GameObject>(checkUiPrefb, UIManager.Instance.canvas.transform);
processTipPanel = tip.GetComponent<ProcessTipPanel>();
}
//开始走进度
processTipPanel.StartProcess(result =>
{
if(result)
{
Debug.Log("核查完成");
isChecked = true;
if (GameManager.UIMgr != null)
{
GameManager.UIMgr.ShowPanel<UI_TopTipPanel>(E_UI_Layer.System, (panel) =>
{
panel.Init($"{""}:<color=blue>{""}</color>", $"{""}");
});
}
}
});
}
}
}