Tz2/Assets/Scripts/MaterialInspectionManager.cs

93 lines
3.2 KiB
C#

using System;
using System.Collections.Generic;
using DefaultNamespace.ProcessMode;
using Framework.Manager;
using MotionFramework;
using TMPro;
using UnityEngine;
using UnityEngine.UI;
using static InterfaceManager;
namespace DefaultNamespace
{
public class MaterialInspectionManager : MonoBehaviour
{
public Toggle hegezheng;
public Toggle shuomingshu;
public Toggle shiyanbaogao;
public Button close;
private bool isOne = false;
/// <summary>
/// 单位
/// </summary>
public TextMeshProUGUI unit;
private void Start()
{
close.onClick.AddListener(delegate
{
if (MotionEngine.GetModule<GlobalDataStorage>().ExamName.Contains("代保管物资出库") ||
MotionEngine.GetModule<GlobalDataStorage>().ExamName.Contains("领用出库"))
{
List<string> list = new List<string>();
list.Add(hegezheng.isOn.ToString());
list.Add(shuomingshu.isOn.ToString());
list.Add(shiyanbaogao.isOn.ToString());
MotionEngine.GetModule<ProcessManager>().HandleClick(list);
TutorialGuideManager.Instance.TriggerNextGuide(close.name);
}
if (MotionEngine.GetModule<GlobalDataStorage>().ExamName.Contains("到货验收入库"))
{
if (!isOne)
{
TutorialGuideManager.Instance.HideGuide();
isOne = true;
}
}
if (MotionEngine.GetModule<GlobalDataStorage>().ExamName.Contains("退出退役代保管入库"))
{
if (!isOne)
{
TutorialGuideManager.Instance.HideGuide();
isOne = true;
}
//else
//{
// TutorialGuideManager.Instance.TriggerNextGuide();
//}
}
if (MotionEngine.GetModule<GlobalDataStorage>().ExamName.Contains("调拨物资入库"))
{
if (!isOne)
{
TutorialGuideManager.Instance.HideGuide();
isOne = true;
}
//else
//{
// TutorialGuideManager.Instance.TriggerNextGuide();
//}
}
if (MotionEngine.GetModule<GlobalDataStorage>().ExamName.Contains("退料物资入库"))
{
if (!isOne)
{
TutorialGuideManager.Instance.HideGuide();
isOne = true;
}
//else
//{
// TutorialGuideManager.Instance.TriggerNextGuide();
//}
}
});
unit = FindObjectByName<TextMeshProUGUI>("TextInputQuantityReceivableMaterials");
unit.text = GameManager.Instance.unit;
}
}
}