From ea4e2a86e27905b458deab3fc51fdee4a69c205c Mon Sep 17 00:00:00 2001 From: Cg-Fly <1499046294@qq.com> Date: Wed, 12 Feb 2025 10:21:08 +0800 Subject: [PATCH] =?UTF-8?q?=E8=80=83=E6=A0=B8=E6=A8=A1=E5=BC=8F=E4=B8=8A?= =?UTF-8?q?=E4=B8=80=E6=AD=A5=E8=A2=AB=E9=80=89=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Application/UI/OperationStepPanel.cs | 26 +++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) 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++)