|
@@ -10,12 +10,6 @@ public class InspectListPanel : MonoBehaviour
|
|
{
|
|
{
|
|
public GongYeContral GongYe;
|
|
public GongYeContral GongYe;
|
|
|
|
|
|
- public static bool isBQREC = false;
|
|
|
|
- public static string bQResult;
|
|
|
|
-
|
|
|
|
- public static bool isWUPECB = false;
|
|
|
|
- public static string wupcb;
|
|
|
|
-
|
|
|
|
|
|
|
|
public static int taskIndex = 0;
|
|
public static int taskIndex = 0;
|
|
public List<GameObject> taskList = new List<GameObject>();
|
|
public List<GameObject> taskList = new List<GameObject>();
|
|
@@ -52,13 +46,32 @@ public class InspectListPanel : MonoBehaviour
|
|
|
|
|
|
public int saoMa;
|
|
public int saoMa;
|
|
public int yuYin;
|
|
public int yuYin;
|
|
- private FunctionInfo _engineeringFunction;
|
|
+ private List<FunctionValue> _currFVList;
|
|
- private List<FunctionValue> _currFVList;
|
|
|
|
private bool isBegain = true;
|
|
private bool isBegain = true;
|
|
|
|
+
|
|
|
|
+ private bool m_IsFirstActiveTrue = true;
|
|
private void Awake()
|
|
private void Awake()
|
|
{
|
|
{
|
|
|
|
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ private void OnEnable()
|
|
|
|
+ {
|
|
|
|
+ if (!m_IsFirstActiveTrue)
|
|
|
|
+ {
|
|
|
|
+ PlaySounds(-2);
|
|
|
|
+ soundsAudioSource = Resources.Load("PlaySounds") as GameObject;
|
|
|
|
+ GameObject sounds = Instantiate(soundsAudioSource, soundsParent.transform.position, Quaternion.identity);
|
|
|
|
+ sounds.transform.parent = soundsParent.transform;
|
|
|
|
+ sounds.name = "playSounds0";
|
|
|
|
+ sounds.GetComponent<PlaySounds>().soundName = "sound0";
|
|
|
|
+
|
|
|
|
+ show_Photo_Video_Model[taskIndex].SetActive(false);
|
|
|
|
+ isBegain = true;
|
|
|
|
+ StartInitialize();
|
|
|
|
+ StartCoroutine(StartshowHand());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
void Start()
|
|
void Start()
|
|
{
|
|
{
|
|
PlaySounds(-2);
|
|
PlaySounds(-2);
|
|
@@ -69,33 +82,27 @@ public class InspectListPanel : MonoBehaviour
|
|
sounds.GetComponent<PlaySounds>().soundName = "sound0";
|
|
sounds.GetComponent<PlaySounds>().soundName = "sound0";
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
-
|
|
|
|
leftButton_show.gameObject.SetActive(false);
|
|
leftButton_show.gameObject.SetActive(false);
|
|
rightButton_show.gameObject.SetActive(false);
|
|
rightButton_show.gameObject.SetActive(false);
|
|
- GongYe.functionChangleAction += EngineeringFunctionChangler;
|
|
|
|
- _engineeringFunction = GongYe.functionInfos.FirstOrDefault(f => f.moduleID == 3 && f.functionID == 2);
|
|
|
|
- StartInitialize();
|
|
|
|
|
|
|
|
- _currFVList = GongYe.GetFunctionValues(_engineeringFunction.functionValues);
|
|
+ _currFVList = new List<FunctionValue>();
|
|
|
|
+ _currFVList.AddRange(GongYe.FunctionValues);
|
|
|
|
+ StartInitialize();
|
|
StartCoroutine(StartshowHand());
|
|
StartCoroutine(StartshowHand());
|
|
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void StartInitialize()
|
|
private void StartInitialize()
|
|
{
|
|
{
|
|
taskIndex = 0;
|
|
taskIndex = 0;
|
|
- for (int i = 0, count = _engineeringFunction.functionValues.Count; i < count; i++)
|
|
+ for (int i = 0, count = _currFVList.Count; i < count; i++)
|
|
{
|
|
{
|
|
- _engineeringFunction.functionValues[i].value = 0;
|
|
+ _currFVList[i].value = 0;
|
|
}
|
|
}
|
|
- _engineeringFunction.functionValues[0].isShow = true;
|
|
+ _currFVList[0].isShow = true;
|
|
-
|
|
|
|
}
|
|
}
|
|
|
|
|
|
IEnumerator StartshowHand()
|
|
IEnumerator StartshowHand()
|
|
@@ -107,20 +114,16 @@ public class InspectListPanel : MonoBehaviour
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- public void ShowHandleClick(int taskIndex)
|
|
|
|
- {
|
|
|
|
- SetEngineeringFunctionInfo(taskIndex);
|
|
|
|
- SelectInspectResultButton();
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
|
|
|
|
-
|
|
+
|
|
|
|
|
|
- public void ShowDetection(int taskIndex)
|
|
+
|
|
|
|
+ public void ShowHandleClick(int taskIndex)
|
|
{
|
|
{
|
|
SetEngineeringFunctionInfo(taskIndex);
|
|
SetEngineeringFunctionInfo(taskIndex);
|
|
|
|
+ SelectInspectResultButton();
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -128,50 +131,29 @@ public class InspectListPanel : MonoBehaviour
|
|
|
|
|
|
private void SetEngineeringFunctionInfo(int index, int newValue)
|
|
private void SetEngineeringFunctionInfo(int index, int newValue)
|
|
{
|
|
{
|
|
- _engineeringFunction.functionValues[index].value = newValue;
|
|
|
|
_currFVList[index].value = newValue;
|
|
_currFVList[index].value = newValue;
|
|
-
|
|
|
|
}
|
|
}
|
|
|
|
|
|
private void SetEngineeringFunctionInfo(int index)
|
|
private void SetEngineeringFunctionInfo(int index)
|
|
{
|
|
{
|
|
isBegain = false;
|
|
isBegain = false;
|
|
- foreach (var item in _engineeringFunction.functionValues)
|
|
+ foreach (var item in _currFVList)
|
|
{
|
|
{
|
|
item.isShow = item.index == index ? true : false;
|
|
item.isShow = item.index == index ? true : false;
|
|
_currFVList[item.index].isShow = item.isShow;
|
|
_currFVList[item.index].isShow = item.isShow;
|
|
}
|
|
}
|
|
-
|
|
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
|
|
-
|
|
+
|
|
|
|
|
|
- private void RefreshInfo()
|
|
+
|
|
- {
|
|
+
|
|
- int _changeIndex = -1;
|
|
+
|
|
- SelectInspectResultButton();
|
|
|
|
- for (int i = 0, count = _engineeringFunction.functionValues.Count; i < count; i++)
|
|
|
|
- {
|
|
|
|
- if (_currFVList[i] != null)
|
|
|
|
- {
|
|
|
|
- if (_currFVList[i].value != _engineeringFunction.functionValues[i].value)
|
|
|
|
-
|
|
|
|
- {
|
|
|
|
- _changeIndex = _engineeringFunction.functionValues[i].index;
|
|
|
|
- Debug.Log(_engineeringFunction.functionValues[i].index + " " + i);
|
|
|
|
-
|
|
|
|
- RefreshState(_changeIndex, _currFVList[i].value, _engineeringFunction.functionValues[i].value);
|
|
|
|
- _currFVList[i].value = _engineeringFunction.functionValues[i].value;
|
|
|
|
- break;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
private void RefreshState(int changeIndex, int prevValue, int currValue)
|
|
private void RefreshState(int changeIndex, int prevValue, int currValue)
|
|
{
|
|
{
|
|
Debug.LogWarning($"当前改变的index {changeIndex} 从{prevValue} 改变为{currValue}");
|
|
Debug.LogWarning($"当前改变的index {changeIndex} 从{prevValue} 改变为{currValue}");
|
|
- taskList[changeIndex].GetComponent<InspectList_Button>().startInspect = (StartInspect)_engineeringFunction.functionValues[changeIndex].value;
|
|
+ taskList[changeIndex].GetComponent<InspectList_Button>().startInspect = (StartInspect)_currFVList[changeIndex].value;
|
|
taskList[changeIndex].GetComponent<InspectList_Button>().SetBtnState();
|
|
taskList[changeIndex].GetComponent<InspectList_Button>().SetBtnState();
|
|
if (currValue == 2 || currValue == 3)
|
|
if (currValue == 2 || currValue == 3)
|
|
{
|
|
{
|
|
@@ -185,8 +167,23 @@ public class InspectListPanel : MonoBehaviour
|
|
case StartInspect.qualified:
|
|
case StartInspect.qualified:
|
|
case StartInspect.Unqualified:
|
|
case StartInspect.Unqualified:
|
|
|
|
|
|
- SetEngineeringFunctionInfo(nextIndex);
|
|
+ if (nextIndex == 0)
|
|
- SelectInspectResultButton();
|
|
+ {
|
|
|
|
+ inspectList.UserClick("buttonTag1");
|
|
|
|
+ }
|
|
|
|
+ else if (nextIndex == 5)
|
|
|
|
+ {
|
|
|
|
+ inspectList.UserClick("buttonTag2");
|
|
|
|
+ }
|
|
|
|
+ else if (nextIndex == 12)
|
|
|
|
+ {
|
|
|
|
+ inspectList.UserClick("buttonTag3");
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ SetEngineeringFunctionInfo(nextIndex);
|
|
|
|
+ SelectInspectResultButton();
|
|
|
|
+ }
|
|
break;
|
|
break;
|
|
default:
|
|
default:
|
|
break;
|
|
break;
|
|
@@ -197,7 +194,6 @@ public class InspectListPanel : MonoBehaviour
|
|
MakeLastSound();
|
|
MakeLastSound();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -205,7 +201,7 @@ public class InspectListPanel : MonoBehaviour
|
|
private void SelectInspectResultButton()
|
|
private void SelectInspectResultButton()
|
|
{
|
|
{
|
|
isBegain = false;
|
|
isBegain = false;
|
|
- foreach (var item in _engineeringFunction.functionValues)
|
|
+ foreach (var item in _currFVList)
|
|
{
|
|
{
|
|
taskList[item.index].GetComponent<InspectList_Button>().OnSelect(item.isShow);
|
|
taskList[item.index].GetComponent<InspectList_Button>().OnSelect(item.isShow);
|
|
show_Photo_Video_Model[item.index].SetActive(item.isShow);
|
|
show_Photo_Video_Model[item.index].SetActive(item.isShow);
|
|
@@ -221,13 +217,6 @@ public class InspectListPanel : MonoBehaviour
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- private void EngineeringFunctionChangler(int moduleID, int functionID, FunctionType functionType, List<FunctionValue> functionValues)
|
|
|
|
- {
|
|
|
|
- if (moduleID == 3 && functionID == 2 && functionType == FunctionType.FlowValue)
|
|
|
|
- {
|
|
|
|
- RefreshInfo();
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
|
|
void Update()
|
|
void Update()
|
|
{
|
|
{
|
|
@@ -249,28 +238,12 @@ public class InspectListPanel : MonoBehaviour
|
|
rightButton.SetActive(false);
|
|
rightButton.SetActive(false);
|
|
rightButton_show.SetActive(false);
|
|
rightButton_show.SetActive(false);
|
|
}
|
|
}
|
|
- if (isBQREC)
|
|
|
|
- {
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- isBQREC = false;
|
|
|
|
- }
|
|
|
|
- if (isWUPECB)
|
|
|
|
- {
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- isWUPECB = false;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
-
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
public void ButtonUserClick(string butoonName)
|
|
public void ButtonUserClick(string butoonName)
|
|
{
|
|
{
|
|
isBegain = false;
|
|
isBegain = false;
|
|
@@ -325,15 +298,11 @@ public class InspectListPanel : MonoBehaviour
|
|
rightButton_show.gameObject.SetActive(false);
|
|
rightButton_show.gameObject.SetActive(false);
|
|
isMakeSound = false;
|
|
isMakeSound = false;
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|
|
void OnDestroy()
|
|
void OnDestroy()
|
|
{
|
|
{
|
|
- GongYe.functionChangleAction -= EngineeringFunctionChangler;
|
|
|
|
-
|
|
|
|
-
|
|
|
|
}
|
|
}
|
|
|
|
|
|
public void Testing_Pass_or_NoPass(String message)
|
|
public void Testing_Pass_or_NoPass(String message)
|
|
@@ -543,6 +512,28 @@ public class InspectListPanel : MonoBehaviour
|
|
}
|
|
}
|
|
AudioManager.Instance.AudioGongYe_OBE_LanguageSounds(soundNames);
|
|
AudioManager.Instance.AudioGongYe_OBE_LanguageSounds(soundNames);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ private void OnDisable()
|
|
|
|
+ {
|
|
|
|
+
|
|
|
|
+ baseViewPanel.SetActive(true);
|
|
|
|
+ contentPanel1.SetActive(true);
|
|
|
|
+ contentPanel2.SetActive(true);
|
|
|
|
+ settlementPanel.SetActive(false);
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ for (int i = 0; i < _currFVList.Count; i++)
|
|
|
|
+ {
|
|
|
|
+ taskList[i].GetComponent<InspectList_Button>().startInspect = StartInspect.Undetected;
|
|
|
|
+ taskList[i].GetComponent<InspectList_Button>().SetBtnState();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ leftButton_show.gameObject.SetActive(false);
|
|
|
|
+ rightButton_show.gameObject.SetActive(false);
|
|
|
|
+
|
|
|
|
+ inspectList.UserClick("buttonTag1");
|
|
|
|
+ m_IsFirstActiveTrue = false;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|