2025-02-12 08:43:33 +08:00

87 lines
2.9 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;
using UnityEngine.UI;
using ZXK.Framework;
using ZXK.UTility;
/*******************************************************************************
*Create By CG
*Function 调试模式控制
*******************************************************************************/
namespace ZXK.BYSS
{
public class GasPanel : UIBase
{
private GameObject _maskPanel = null;
/// <summary>
///
/// </summary>
private void OnEnable()
{
string hintStr = null;
//根据模块来进行判断
//搬运输送特殊充气提示
if (AppManagement.Instance._CurType == EnumCtrl.Type.BYSS)
{
hintStr = "操作提示请打开气泵阀门开关对气动回路充气待压力表指针达到2MPa以上时停止充气";
}
else
{
hintStr = "操作提示请打开气泵阀门开关对气动回路充气待压力表指针达到2MPa以上时停止充气";
}
_maskPanel = GetWedage("EnterMask_N");
_maskPanel.gameObject.SetActive(false);
GetWedage("TipText_N").GetComponent<Text>().text = hintStr;
//PopUpMng.PopToast("实训任务3", hintStr, "确定", () =>
//{
//});
//查找任务进程单例类
///充气按钮被点击前的操作,设置最佳视角,设置被点击按钮闪烁
bool IsHave = UI_Manage.Instance.GetPanel("PracticeAndExamPanel")
.GetComponent<PracticeAndExamPanel>()._CurTrainExamSceneCtrl;
PracticeAndExamInSceneCtrl _practiceAndExamCtrl = UI_Manage.Instance.GetPanel("PracticeAndExamPanel")
.GetComponent<PracticeAndExamPanel>()._CurTrainExamSceneCtrl;
if (IsHave)
{
//Debug.Log("查找到单例类");
_practiceAndExamCtrl.Set_ChongQi_CameraPos();
_practiceAndExamCtrl.Set_QiBengSwitchs_HighLight_On();
if (AppManagement.Instance._CurType==EnumCtrl.Type.BYSS)
{
_practiceAndExamCtrl.ShowAnim();
}
}
}
private void Start()
{
//AddEventListener("RunningBtn_N", UIEventType.OnButtonClick, () =>
//{
// AppManagement.Instance.EnterProcess(EnumCtrl.Model.Running);
//});
var _practiceAndExamCtrl = UI_Manage.Instance.GetPanel("PracticeAndExamPanel")
.GetComponent<PracticeAndExamPanel>()._CurTrainExamSceneCtrl;
//声音播放
if (_practiceAndExamCtrl.speakManager!=null)
{
_practiceAndExamCtrl.speakManager.PlayAudioCilp();
}
}
}
}