diff --git a/Assets/StreamingAssets/Excel/NiuData.xlsx b/Assets/StreamingAssets/Excel/NiuData.xlsx index 46b8a0e..34ff75f 100644 Binary files a/Assets/StreamingAssets/Excel/NiuData.xlsx and b/Assets/StreamingAssets/Excel/NiuData.xlsx differ diff --git a/Assets/StreamingAssets/ExcelJson/NiuData.txt b/Assets/StreamingAssets/ExcelJson/NiuData.txt index f472b3c..da9060b 100644 --- a/Assets/StreamingAssets/ExcelJson/NiuData.txt +++ b/Assets/StreamingAssets/ExcelJson/NiuData.txt @@ -365,7 +365,7 @@ "CameraDefaultTR": "1.346_-2.303_-0.54|0_0_0", "CameraNearTR": "", "QNextNum": 16, - "ExamModelBT": "", + "ExamModelBT": "阴道栓*长柄钳", "ExamTip": "请按顺序进行相关操作", "ExamEvvr": "选择错误,应先准备阴道栓", "Question": "", @@ -1665,7 +1665,7 @@ "CameraDefaultTR": "1.346_-2.303_-0.54|0_0_0", "CameraNearTR": "", "QNextNum": 68, - "ExamModelBT": "", + "ExamModelBT": "阴道栓*长柄钳", "ExamTip": "请按顺序进行相关操作", "ExamEvvr": "选择错误,应先准备阴道栓", "Question": "", @@ -2390,7 +2390,7 @@ "CameraDefaultTR": "", "CameraNearTR": "", "QNextNum": 97, - "ExamModelBT": "", + "ExamModelBT": "玻璃棒*牛的精液A*牛的精液B*牛的精液C", "ExamTip": "请按顺序进行相关操作", "ExamEvvr": "选择错误,应蘸取精液", "Question": "", @@ -3140,7 +3140,7 @@ "CameraDefaultTR": "1.7027_-2.303_-0.659|7_0_0", "CameraNearTR": "", "QNextNum": 128, - "ExamModelBT": "", + "ExamModelBT": "0.3%高锰酸钾*消毒纸巾", "ExamTip": "", "ExamEvvr": "", "Question": "", @@ -3815,7 +3815,7 @@ "CameraDefaultTR": "1.7027_-2.303_-0.659|7_0_0", "CameraNearTR": "", "QNextNum": 155, - "ExamModelBT": "", + "ExamModelBT": "Cpbeizi*Cpxiaoduzhijin", "ExamTip": "请按顺序进行相关操作", "ExamEvvr": "选择错误,应使用扩张棒操作", "Question": "", @@ -4515,7 +4515,7 @@ "CameraDefaultTR": "", "CameraNearTR": "", "QNextNum": 182, - "ExamModelBT": "", + "ExamModelBT": "高硼硅玻璃细管*口吸管", "ExamTip": "请按顺序进行相关操作", "ExamEvvr": "选择错误,应选择玻璃细管和口吸管", "Question": "", diff --git a/Assets/_Scenes/TrainExam.unity b/Assets/_Scenes/TrainExam.unity index 2570fdf..9d01590 100644 --- a/Assets/_Scenes/TrainExam.unity +++ b/Assets/_Scenes/TrainExam.unity @@ -6834,6 +6834,12 @@ Transform: type: 3} m_PrefabInstance: {fileID: 416603169} m_PrefabAsset: {fileID: 0} +--- !u!1 &416603171 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 265685189950564712, guid: a623bdd0c9a05dd448dd9cc858aca9f1, + type: 3} + m_PrefabInstance: {fileID: 416603169} + m_PrefabAsset: {fileID: 0} --- !u!1001 &422360618 PrefabInstance: m_ObjectHideFlags: 0 @@ -9230,6 +9236,12 @@ Transform: type: 3} m_PrefabInstance: {fileID: 587790278} m_PrefabAsset: {fileID: 0} +--- !u!1 &587790280 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 265685189950564712, guid: a623bdd0c9a05dd448dd9cc858aca9f1, + type: 3} + m_PrefabInstance: {fileID: 587790278} + m_PrefabAsset: {fileID: 0} --- !u!1 &588346246 GameObject: m_ObjectHideFlags: 0 @@ -10994,6 +11006,12 @@ Transform: type: 3} m_PrefabInstance: {fileID: 694871476} m_PrefabAsset: {fileID: 0} +--- !u!1 &694871478 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 265685189950564712, guid: a623bdd0c9a05dd448dd9cc858aca9f1, + type: 3} + m_PrefabInstance: {fileID: 694871476} + m_PrefabAsset: {fileID: 0} --- !u!1 &698929352 GameObject: m_ObjectHideFlags: 0 @@ -13830,6 +13848,14 @@ MonoBehaviour: - {fileID: 985674199115698890} - {fileID: 1752369248} - {fileID: 1608547272} + _signTrans: + - {fileID: 412918334} + - {fileID: 1385361293} + - {fileID: 416603171} + - {fileID: 587790280} + - {fileID: 1800198919} + - {fileID: 694871478} + - {fileID: 1160721213} _peoplePlanTimeLineClip: {fileID: 11400000, guid: 650596eb2f54a364eaf5458ae2439d75, type: 2} _CSPLCLTimeLineClip: {fileID: 11400000, guid: 66029414ec3d89b469ed349852ba3d92, @@ -17526,6 +17552,12 @@ Transform: type: 3} m_PrefabInstance: {fileID: 1160721211} m_PrefabAsset: {fileID: 0} +--- !u!1 &1160721213 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 265685189950564712, guid: a623bdd0c9a05dd448dd9cc858aca9f1, + type: 3} + m_PrefabInstance: {fileID: 1160721211} + m_PrefabAsset: {fileID: 0} --- !u!1 &1161844727 GameObject: m_ObjectHideFlags: 0 @@ -19760,6 +19792,12 @@ Transform: type: 3} m_PrefabInstance: {fileID: 1385361291} m_PrefabAsset: {fileID: 0} +--- !u!1 &1385361293 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 265685189950564712, guid: a623bdd0c9a05dd448dd9cc858aca9f1, + type: 3} + m_PrefabInstance: {fileID: 1385361291} + m_PrefabAsset: {fileID: 0} --- !u!1 &1391538821 GameObject: m_ObjectHideFlags: 0 @@ -22818,6 +22856,12 @@ Transform: type: 3} m_PrefabInstance: {fileID: 1800198917} m_PrefabAsset: {fileID: 0} +--- !u!1 &1800198919 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 265685189950564712, guid: a623bdd0c9a05dd448dd9cc858aca9f1, + type: 3} + m_PrefabInstance: {fileID: 1800198917} + m_PrefabAsset: {fileID: 0} --- !u!1 &1808384780 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/_Scripts/Application/SceneCtrls/NiuSceneMng.cs b/Assets/_Scripts/Application/SceneCtrls/NiuSceneMng.cs index dd96e10..a9a4ae2 100644 --- a/Assets/_Scripts/Application/SceneCtrls/NiuSceneMng.cs +++ b/Assets/_Scripts/Application/SceneCtrls/NiuSceneMng.cs @@ -19,11 +19,15 @@ namespace ZXK.LouDiXvMuNiu //Ʒչʾ [SerializeField] private Transform[] _toolContain = null; + [SerializeField]//Ϊǩڳе + private GameObject[] _signTrans = null; private List _curModuleToolArray = new List();//ǰҪõй // public NiuData _CurSceneStep;//Ϊ˷Աȣʱ浱ǰ - private Dictionary> _curStepUseBTDic;//ǰҪ壬trueʾȷѡfalseʾѡ + + private Dictionary> _curStepUseBTDic;//ǰҪ壬trueʾ嶼Ҫ㣬falseʾһ + public Dictionary> _CurStepUseBtDic { get => _curStepUseBTDic; } private List _currentHighlights = new List(); private PlayableDirector _curTimeLine = null; private TimelineDirectorCtrl _curTimeLineCtrl = null; @@ -304,67 +308,69 @@ namespace ZXK.LouDiXvMuNiu /// ȡ˲ҪĹ /// /// - public List GetNeedClickTools(NiuData step) + public void GetNeedClickTools(NiuData step) { - List triGeos = new List(); - List tempData = GameManager.Instance._DataNiuHandler.NiuStepTypeDic[GameManager.Instance._CurModelType]; - for (int i = 0; i < tempData.Count; i++) + for (int i = 0; i < _signTrans.Length; i++) { - if (tempData[i].TaskType==ConstCtrl.TASKTYPE_Tran) continue; - string[] tris = tempData[i].ModelBT.Split("|"); - for (int j = 0; j < tris.Length; j++) - { - GameObject toolGeo = UtilitiesMng.GetGeoByName(new Transform[1] { transform }, tris[j], true); - if (toolGeo && !triGeos.Contains(toolGeo)) - { - if (toolGeo.name.Contains("sign")) - { - toolGeo.SetActive(false); - } - triGeos.Add(toolGeo); - } - } + _signTrans[i].SetActive(false); } - _curStepUseBTDic = new Dictionary>(); List toolTemp = new List(); - string[] tempBtArray = step.ModelBT.Split("+"); - if (GameManager.Instance._StateContext.GetState().Name.Equals("ExamState") - &&!string.IsNullOrEmpty(step.ExamModelBT)) + if (GameManager.Instance._StateContext.GetState().Name.Equals("TrainState")) { - tempBtArray = step.ExamModelBT.Split("+"); - } - for (int i = 0; i < tempBtArray.Length; i++) - { - string[] tempBts = tempBtArray[i].Split("|"); - int count = 0; - if (GameManager.Instance._StateContext.GetState().Name.Equals("ExamState")) + string[] tempBts = step.ModelBT.Split("|"); + string[] tempSelects = tempBts[0].Split("+"); + for (int i = 0; i < tempSelects.Length; i++) { - count = tempBts.Length; - } - else - { - count = 1; - } - for (int j = 0; j < count; j++) - { - GameObject tempGeo = UtilitiesMng.GetGeoByName(new Transform[1] { transform }, tempBts[j], true); + GameObject tempGeo = UtilitiesMng.GetGeoByName(new Transform[1] { transform }, tempSelects[i], true); if (tempGeo == null) continue; tempGeo.SetActive(true); toolTemp.Add(tempGeo); - if (_curStepUseBTDic.ContainsKey(j == 0)) + } + _curStepUseBTDic.Add(true, toolTemp); + } + if (GameManager.Instance._StateContext.GetState().Name.Equals("ExamState")) + { + string[] tempBts = step.ModelBT.Split("|"); + if (!string.IsNullOrEmpty(step.ExamModelBT)) + { + tempBts = step.ExamModelBT.Split("|"); + } + for (int i = 0; i < tempBts.Length; i++) + { + string[] tempExamSelects = null; + if (tempBts[i].Contains("+")) { - _curStepUseBTDic[j == 0].Add(tempGeo); + tempExamSelects = tempBts[i].Split("+"); + } + else if (tempBts[i].Contains("*")) + { + tempExamSelects = tempBts[i].Split("*"); } else { - List tempList = new List(); - tempList.Add(tempGeo); - _curStepUseBTDic.Add(j == 0, tempList); + tempExamSelects = new string[1] { tempBts[i] }; + } + for (int j = 0; j < tempExamSelects.Length; j++) + { + GameObject tempGeo = UtilitiesMng.GetGeoByName(new Transform[1] { transform }, tempExamSelects[j], true); + if (tempGeo == null) continue; + tempGeo.SetActive(true); + if (i == 0) + { + toolTemp.Add(tempGeo); + } + } + if (tempBts[i].Contains("*")) + { + _curStepUseBTDic.Add(false, toolTemp); + } + else + { + _curStepUseBTDic.Add(true, toolTemp); } } } - return toolTemp; } /// /// ô˲Ҫʾ @@ -447,25 +453,36 @@ namespace ZXK.LouDiXvMuNiu if (GameManager.Instance._StateContext.GetState().Name.Equals("ExamState")) { bool addScoreTemp = true; - List useBts = _curStepUseBTDic[true]; - - if (useBts.Contains(triGeo)) + List useBts = new List(); + if (_curStepUseBTDic.ContainsKey(false)) { - if (triGeo.GetComponent()) + useBts = _curStepUseBTDic[false]; + if (useBts.Contains(triGeo)) { - triGeo.GetComponent().enabled = false; + useBts.Clear(); + } + } + else if(_curStepUseBTDic.ContainsKey(true)) + { + useBts = _curStepUseBTDic[true]; + if (useBts.Contains(triGeo)) + { + if (triGeo.GetComponent()) + { + triGeo.GetComponent().enabled = false; + } + else + { + triGeo.SetActive(false); + } + useBts.Remove(triGeo); } else { - triGeo.SetActive(false); + PopUpMng.PopChoseErrowToast(_CurSceneStep.ExamEvvr, 2.0f); + useBts.Clear(); + addScoreTemp = false; } - useBts.Remove(triGeo); - } - else - { - PopUpMng.PopChoseErrowToast(_CurSceneStep.ExamEvvr, 2.0f); - useBts.Clear(); - addScoreTemp = false; } if (useBts.Count == 0) diff --git a/Assets/_Scripts/Application/UI/OperationStepPanel.cs b/Assets/_Scripts/Application/UI/OperationStepPanel.cs index aab3df9..dc22b4f 100644 --- a/Assets/_Scripts/Application/UI/OperationStepPanel.cs +++ b/Assets/_Scripts/Application/UI/OperationStepPanel.cs @@ -345,8 +345,8 @@ namespace ZXK.LouDiXvMuNiu } if (GameManager.Instance._StateContext.GetState().Name.Equals("TrainState")) { - List tempToolArray = NiuSceneMng._Instance.GetNeedClickTools(obj); - NiuSceneMng._Instance.OnlyShowBTGeo(tempToolArray.ToArray()); + NiuSceneMng._Instance.GetNeedClickTools(obj); + NiuSceneMng._Instance.OnlyShowBTGeo(NiuSceneMng._Instance._CurStepUseBtDic[true].ToArray()); } else if (GameManager.Instance._StateContext.GetState().Name.Equals("ExamState")) { @@ -388,8 +388,8 @@ namespace ZXK.LouDiXvMuNiu { if (GameManager.Instance._StateContext.GetState().Name.Equals("TrainState")) { - List tempToolArray = NiuSceneMng._Instance.GetNeedClickTools(obj); - NiuSceneMng._Instance.OnlyShowBTGeo(tempToolArray.ToArray()); + NiuSceneMng._Instance.GetNeedClickTools(obj); + NiuSceneMng._Instance.OnlyShowBTGeo(NiuSceneMng._Instance._CurStepUseBtDic[true].ToArray()); } else if (GameManager.Instance._StateContext.GetState().Name.Equals("ExamState")) {