diff --git a/Assets/_Scripts/Application/UI/OperationStepPanel.cs b/Assets/_Scripts/Application/UI/OperationStepPanel.cs index a60814a..c576563 100644 --- a/Assets/_Scripts/Application/UI/OperationStepPanel.cs +++ b/Assets/_Scripts/Application/UI/OperationStepPanel.cs @@ -9,6 +9,7 @@ using System.Collections.Generic; using System.IO; using UnityEngine; using UnityEngine.UI; + /******************************************************************************* *Create By CG *Function @@ -328,11 +329,16 @@ namespace ZXK.LouDiXvMuNiu } } //选项自身变化 + Transform previousTran = null; Transform seleTran = null; for (int i = 0; i < _stepChildrens.Count; i++) { if (_stepChildrens[i].name.Equals(objLight.id.ToString())) { + if (objLight.id > 1&&i>0) + { + previousTran= _stepChildrens[i-1].transform; + } seleTran = _stepChildrens[i].transform; } if (GameManager.Instance._StateContext.GetState().Name.Equals("TrainState")) @@ -341,8 +347,24 @@ namespace ZXK.LouDiXvMuNiu _stepChildrens[i].transform.Find("TextContent").GetComponent().color = Color.white; } } - Text nameTxt = seleTran.Find("TextContent").GetComponent(); - nameTxt.color = new Color(25 / 255.0f, 224 / 255.0f, 224 / 255.0f); + + if (GameManager.Instance._StateContext.GetState().Name.Equals("ExamState")) + { + if (previousTran != null) + { + Text previousNameTxt = previousTran.Find("TextContent").GetComponent(); + previousNameTxt.color = new Color(25 / 255.0f, 224 / 255.0f, 224 / 255.0f); + } + + Text nameTxt = seleTran.Find("TextContent").GetComponent(); + nameTxt.color = new Color(25 / 255.0f, 224 / 255.0f, 224 / 255.0f); + } + else + { + Text nameTxt = seleTran.Find("TextContent").GetComponent(); + nameTxt.color = new Color(25 / 255.0f, 224 / 255.0f, 224 / 255.0f); + } + //根据子选项Transform找到大步骤选项变化 for (int i = 0; i < _stepBigs.Count; i++)