Tz2/Assets/Scripts/WeighBridgeCheck.cs

75 lines
1.8 KiB
C#

using DefaultNamespace.ProcessMode;
using System.Collections;
using System.Collections.Generic;
using TMPro;
using UnityEngine;
using UnityEngine.UI;
using static InterfaceManager;
/// <summary>
/// 地磅
/// </summary>
public class WeighBridgeCheck : MonoBehaviour
{
public static WeighBridgeCheck instance;
/// <summary>
/// 称重提示
/// </summary>
public GameObject weightips;
/// <summary>
/// 打印提示
/// </summary>
public GameObject printtips;
/// <summary>
/// 是否检查了地磅
/// </summary>
public bool isCheckWeigh;
/// <summary>
/// 是否检查地磅显示屏
/// </summary>
public bool isdisplay;
/// <summary>
/// 重量显示
/// </summary>
public TextMeshProUGUI weightext;
/// <summary>
/// 称重次数
/// </summary>
int index = 0;
/// <summary>
/// 称重
/// </summary>
public Button weighbt;
/// <summary>
/// 打印
/// </summary>
public Button printbt;
private void Awake()
{
instance = this;
}
void Start()
{
weighbt.onClick.AddListener(() =>
{
weightips.SetActive(false);
printtips.SetActive(true);
CarMoverToWeigh.Instance.CarMove();
MotionFramework.MotionEngine.GetModule<ProcessManager>().HandleClick("true");
});
printbt.onClick.AddListener(() =>
{
printtips.SetActive(false);
if
(!CarMoverToWeigh.Instance.IsUnload)
{
LoadTriggerNextGuide(printbt.name);
}
UI_Tips.instance.ShowPanel("打印完成!");
MotionFramework.MotionEngine.GetModule<ProcessManager>().HandleClick("true");
});
}
void Update()
{
}
}