From 54937fab796dd16a3d633ea0e8038dd4314999df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=A0=95=EC=98=81=EB=AF=BC?= <117150306+jym04@users.noreply.github.com> Date: Thu, 20 Mar 2025 16:22:02 +0900 Subject: [PATCH] =?UTF-8?q?=EC=83=9D=EC=82=B0,=20=EC=A1=B0=EB=A6=BD=20?= =?UTF-8?q?=EC=A7=84=ED=96=89=20=ED=98=84=ED=99=A9=ED=8C=90=20=EA=B8=B0?= =?UTF-8?q?=EB=8A=A5=20=EA=B0=9C=EC=84=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Scripts/UI/Panel_AssemblyProduction.cs | 5 ++-- Assets/Scripts/UI/Panel_Effect.cs | 28 +++++++++++++++++++ .../Scripts/UI/Panel_InjectionProduction.cs | 5 ++-- Assets/Scripts/UI/Panel_WorkProgressStatus.cs | 5 ++-- CompleteTimeAlarmInfo.json | 2 +- 5 files changed, 38 insertions(+), 7 deletions(-) diff --git a/Assets/Scripts/UI/Panel_AssemblyProduction.cs b/Assets/Scripts/UI/Panel_AssemblyProduction.cs index 1e7d11cc..46d3ec35 100644 --- a/Assets/Scripts/UI/Panel_AssemblyProduction.cs +++ b/Assets/Scripts/UI/Panel_AssemblyProduction.cs @@ -31,15 +31,16 @@ public class Panel_AssemblyProduction : PanelBase } public void Open() { - effect.gameObject.SetActive(true); + effect.ActivePanel(gameObject); gameObject.SetActive(true); + gameObject.transform.SetAsLastSibling(); StopAllCoroutines(); StartCoroutine(ScaleUp()); } public void Close() { - effect.gameObject.SetActive(false); + effect.DeactivePanel(gameObject); gameObject.SetActive(false); gameObject.transform.localScale = Vector3.zero; } diff --git a/Assets/Scripts/UI/Panel_Effect.cs b/Assets/Scripts/UI/Panel_Effect.cs index 6027fca1..ef2b3b5e 100644 --- a/Assets/Scripts/UI/Panel_Effect.cs +++ b/Assets/Scripts/UI/Panel_Effect.cs @@ -5,4 +5,32 @@ using WI; public class Panel_Effect : MonoBehaviour, ISingle { + public int activeCount; + + private List activePanel = new(); + + public void ActivePanel(GameObject panelObject) + { + if (!activePanel.Contains(panelObject)) + { + activePanel.Add(panelObject); + activeCount++; + } + + gameObject.SetActive(true); + } + public void DeactivePanel(GameObject panelObject) + { + if (activeCount > 0) + { + activePanel.Remove(panelObject); + + activeCount--; + + if (activeCount <= 0) + { + gameObject.SetActive(false); + } + } + } } diff --git a/Assets/Scripts/UI/Panel_InjectionProduction.cs b/Assets/Scripts/UI/Panel_InjectionProduction.cs index d42362e9..1ed34b6e 100644 --- a/Assets/Scripts/UI/Panel_InjectionProduction.cs +++ b/Assets/Scripts/UI/Panel_InjectionProduction.cs @@ -32,15 +32,16 @@ public class Panel_InjectionProduction : PanelBase } public void Open() { - effect.gameObject.SetActive(true); + effect.ActivePanel(gameObject); gameObject.SetActive(true); + gameObject.transform.SetAsLastSibling(); StopAllCoroutines(); StartCoroutine(ScaleUp()); } public void Close() { - effect.gameObject.SetActive(false); + effect.DeactivePanel(gameObject); gameObject.SetActive(false); gameObject.transform.localScale = Vector3.zero; } diff --git a/Assets/Scripts/UI/Panel_WorkProgressStatus.cs b/Assets/Scripts/UI/Panel_WorkProgressStatus.cs index 03809a1d..681cd31f 100644 --- a/Assets/Scripts/UI/Panel_WorkProgressStatus.cs +++ b/Assets/Scripts/UI/Panel_WorkProgressStatus.cs @@ -32,15 +32,16 @@ public class Panel_WorkProgressStatus : PanelBase } public void Open() { - effect.gameObject.SetActive(true); + effect.ActivePanel(gameObject); gameObject.SetActive(true); + gameObject.transform.SetAsLastSibling(); StopAllCoroutines(); StartCoroutine(ScaleUp()); } public void Close() { - effect.gameObject.SetActive(false); + effect.DeactivePanel(gameObject); gameObject.SetActive(false); gameObject.transform.localScale = Vector3.zero; } diff --git a/CompleteTimeAlarmInfo.json b/CompleteTimeAlarmInfo.json index 137e0e85..1f19da16 100644 --- a/CompleteTimeAlarmInfo.json +++ b/CompleteTimeAlarmInfo.json @@ -1150,7 +1150,7 @@ "sttm": "0758", "totm": "", "goaltime": "530", - "ptotm": "2025-03-20 11:51:27", + "ptotm": "2025-03-20 21:35:36", "psttm": "2025-03-17 07:58:12" }, "isCheck": false