From b59bb651ea1d98c566a2ffd3b28e5e0b59bcb2a2 Mon Sep 17 00:00:00 2001
From: Ding Yuntian <1491671119@qq.com>
Date: Fri, 6 Mar 2026 18:31:54 +0800
Subject: [PATCH] =?UTF-8?q?fix(fix-system):=20=E4=BF=AE=E5=A4=8DCablePanel?=
=?UTF-8?q?Light=E6=9E=9A=E4=B8=BE=E5=BC=95=E7=94=A8=E5=92=8C=E5=91=BD?=
=?UTF-8?q?=E5=90=8D=E7=A9=BA=E9=97=B4=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../FixLightSystem/FixLightSystem.cs | 19 +-------
.../Screen System/FixPanel/CablePanelLight.cs | 45 +++++++++++++------
.../Screen System/ScreenYarnCommand.cs | 4 +-
3 files changed, 34 insertions(+), 34 deletions(-)
diff --git a/Assets/Scripts/FixSystemNew/FixLightSystem/FixLightSystem.cs b/Assets/Scripts/FixSystemNew/FixLightSystem/FixLightSystem.cs
index 85d0e11dc..f3600c83d 100644
--- a/Assets/Scripts/FixSystemNew/FixLightSystem/FixLightSystem.cs
+++ b/Assets/Scripts/FixSystemNew/FixLightSystem/FixLightSystem.cs
@@ -1,4 +1,4 @@
-using UnityEngine;
+using UnityEngine;
using UnityEngine.Rendering.Universal;
using System.Collections;
using System.Collections.Generic;
@@ -23,23 +23,6 @@ namespace AibisDream.FixSystem
Emergency // 紧急状态
}
- ///
- /// 小灯状态
- ///
- public enum SmallLightState
- {
- Default, // 默认状态
- Operation // 运行状态
- }
-
- ///
- /// 小灯状态状态
- ///
- public enum SmallLightStatus
- {
- Normal, // 正常
- Error // 错误
- }
#endregion
diff --git a/Assets/Scripts/FixSystemNew/Screen System/FixPanel/CablePanelLight.cs b/Assets/Scripts/FixSystemNew/Screen System/FixPanel/CablePanelLight.cs
index 081272b2c..e85ee3066 100644
--- a/Assets/Scripts/FixSystemNew/Screen System/FixPanel/CablePanelLight.cs
+++ b/Assets/Scripts/FixSystemNew/Screen System/FixPanel/CablePanelLight.cs
@@ -1,8 +1,6 @@
-using UnityEngine;
+using UnityEngine;
using UnityEngine.Rendering.Universal;
using DG.Tweening;
-using AibisDream.Kit;
-using AibisDream.Framework;
using System.Collections;
using System.Collections.Generic;
@@ -51,8 +49,8 @@ namespace AibisDream.FixSystem
[SerializeField] private float operationBlinkInterval = 0.1f;
private List smallLightSprites = new List();
- private FixLightSystem.SmallLightState smallLightState = FixLightSystem.SmallLightState.Default;
- private FixLightSystem.SmallLightStatus smallLightStatus = FixLightSystem.SmallLightStatus.Normal;
+ private SmallLightState smallLightState = SmallLightState.Default;
+ private SmallLightStatus smallLightStatus = SmallLightStatus.Normal;
#endregion
@@ -112,7 +110,7 @@ namespace AibisDream.FixSystem
InitializeSystemOff();
}
- SetSmallLightState(FixLightSystem.SmallLightState.Default);
+ SetSmallLightState(SmallLightState.Default);
}
///
@@ -232,14 +230,14 @@ namespace AibisDream.FixSystem
///
/// 设置小灯状态
///
- public void SetSmallLightState(FixLightSystem.SmallLightState newState)
+ public void SetSmallLightState(SmallLightState newState)
{
if (smallLightState != newState)
{
smallLightState = newState;
- if (newState == FixLightSystem.SmallLightState.Default)
+ if (newState == SmallLightState.Default)
{
- smallLightStatus = FixLightSystem.SmallLightStatus.Normal;
+ smallLightStatus = SmallLightStatus.Normal;
}
StartCoroutine(HandleSmallLightStateChange());
}
@@ -248,7 +246,7 @@ namespace AibisDream.FixSystem
///
/// 设置小灯状态状态
///
- public void SetSmallLightStatus(FixLightSystem.SmallLightStatus newStatus)
+ public void SetSmallLightStatus(SmallLightStatus newStatus)
{
if (smallLightStatus != newStatus)
{
@@ -364,7 +362,7 @@ namespace AibisDream.FixSystem
///
private IEnumerator HandleSmallLightStateChange()
{
- if (smallLightState == FixLightSystem.SmallLightState.Operation)
+ if (smallLightState == SmallLightState.Operation)
{
yield return StartCoroutine(OperationBlinkSequence());
SetSmallLightsToOperationState();
@@ -408,7 +406,7 @@ namespace AibisDream.FixSystem
///
private Color GetSmallLightColorByStatus()
{
- return smallLightStatus == FixLightSystem.SmallLightStatus.Normal ? smallLightNormalColor : smallLightErrorColor;
+ return smallLightStatus == SmallLightStatus.Normal ? smallLightNormalColor : smallLightErrorColor;
}
///
@@ -434,7 +432,7 @@ namespace AibisDream.FixSystem
///
private void UpdateSmallLightsStatus()
{
- Color targetColor = smallLightStatus == FixLightSystem.SmallLightStatus.Normal
+ Color targetColor = smallLightStatus == SmallLightStatus.Normal
? smallLightNormalColor
: smallLightErrorColor;
@@ -452,7 +450,7 @@ namespace AibisDream.FixSystem
{
TurnOffAllSmallLights();
}
- else if (smallLightState == FixLightSystem.SmallLightState.Default)
+ else if (smallLightState == SmallLightState.Default)
{
ResetSmallLightsToDefault();
}
@@ -595,4 +593,23 @@ namespace AibisDream.FixSystem
#endregion
}
+
+ ///
+ /// 小灯状态
+ ///
+ public enum SmallLightState
+ {
+ Default, // 默认状态
+ Operation // 运行状态
+ }
+
+ ///
+ /// 小灯状态状态
+ ///
+ public enum SmallLightStatus
+ {
+ Normal, // 正常
+ Error // 错误
+ }
+
}
diff --git a/Assets/Scripts/FixSystemNew/Screen System/ScreenYarnCommand.cs b/Assets/Scripts/FixSystemNew/Screen System/ScreenYarnCommand.cs
index d6175dc64..8e5add39f 100644
--- a/Assets/Scripts/FixSystemNew/Screen System/ScreenYarnCommand.cs
+++ b/Assets/Scripts/FixSystemNew/Screen System/ScreenYarnCommand.cs
@@ -57,7 +57,7 @@ namespace AibisDream
public static void SetSmallLightState(string state)
{
if (CablePanelLight == null) return;
- if (System.Enum.TryParse(state, true, out var smallLightState))
+ if (System.Enum.TryParse(state, true, out var smallLightState))
{
CablePanelLight.SetSmallLightState(smallLightState);
}
@@ -67,7 +67,7 @@ namespace AibisDream
public static void SetSmallLightStatus(string status)
{
if (CablePanelLight == null) return;
- if (System.Enum.TryParse(status, true, out var smallLightStatus))
+ if (System.Enum.TryParse(status, true, out var smallLightStatus))
{
CablePanelLight.SetSmallLightStatus(smallLightStatus);
}