From 7aad5a3d2c21af28b47eeec29f0d51137c9dd61b Mon Sep 17 00:00:00 2001 From: NTG_DESKTOP Date: Tue, 12 Aug 2025 21:57:39 +0900 Subject: [PATCH] =?UTF-8?q?EndCurrentFlow=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/_DDD/_Scripts/GameFlow/GameFlowManager.cs | 9 +++++++-- Assets/_DDD/_Scripts/GameFlow/GameFlowTask.cs | 11 ----------- Assets/_DDD/_Scripts/GameFlow/GameFlowTask.cs.meta | 2 -- 3 files changed, 7 insertions(+), 15 deletions(-) delete mode 100644 Assets/_DDD/_Scripts/GameFlow/GameFlowTask.cs delete mode 100644 Assets/_DDD/_Scripts/GameFlow/GameFlowTask.cs.meta diff --git a/Assets/_DDD/_Scripts/GameFlow/GameFlowManager.cs b/Assets/_DDD/_Scripts/GameFlow/GameFlowManager.cs index 3f6a49d0e..28a990068 100644 --- a/Assets/_DDD/_Scripts/GameFlow/GameFlowManager.cs +++ b/Assets/_DDD/_Scripts/GameFlow/GameFlowManager.cs @@ -47,7 +47,7 @@ public void ChangeFlow(GameFlowState newFlowState) return; } - EndCurrentFlow(); + _ = EndCurrentFlow(); _ = ReadyNewFlow(newFlowState); } @@ -57,9 +57,14 @@ private bool CanChangeFlow(GameFlowState newFlowState) return true; } - private void EndCurrentFlow() + private async Task EndCurrentFlow() { + var endCurrentFlowState = GameFlowDataSo.CurrentGameState; + foreach (var handler in FlowHandlers) + { + await handler.OnExitCurrentFlow(endCurrentFlowState); + } } private async Task ReadyNewFlow(GameFlowState newFlowState) diff --git a/Assets/_DDD/_Scripts/GameFlow/GameFlowTask.cs b/Assets/_DDD/_Scripts/GameFlow/GameFlowTask.cs deleted file mode 100644 index 5cec95e27..000000000 --- a/Assets/_DDD/_Scripts/GameFlow/GameFlowTask.cs +++ /dev/null @@ -1,11 +0,0 @@ -// using System.Threading.Tasks; -// using UnityEngine; -// -// namespace DDD -// { -// public abstract class GameFlowTask : ScriptableObject -// { -// public abstract Task OnReadyNewFlow(GameFlowState newFlowState); -// public abstract Task OnExitCurrentFlow(GameFlowState exitingFlowState); -// } -// } \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/GameFlow/GameFlowTask.cs.meta b/Assets/_DDD/_Scripts/GameFlow/GameFlowTask.cs.meta deleted file mode 100644 index af1144a50..000000000 --- a/Assets/_DDD/_Scripts/GameFlow/GameFlowTask.cs.meta +++ /dev/null @@ -1,2 +0,0 @@ -fileFormatVersion: 2 -guid: b072e73316b7d534b8ec18ffa0b8bfa2 \ No newline at end of file