From 8d11d54875871315e32ca9dbb148d3133072b698 Mon Sep 17 00:00:00 2001 From: dldydtn9755-crypto Date: Thu, 25 Jun 2026 18:37:25 +0900 Subject: [PATCH] =?UTF-8?q?=E3=84=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/01_Scenes/MazeRoom.unity | 4 +- Assets/01_Scenes/blackjack.unity | 4 +- .../RandomSceneRouteManager.cs | 44 +++++++++---------- 3 files changed, 26 insertions(+), 26 deletions(-) diff --git a/Assets/01_Scenes/MazeRoom.unity b/Assets/01_Scenes/MazeRoom.unity index d7e2943c..bc4df383 100644 --- a/Assets/01_Scenes/MazeRoom.unity +++ b/Assets/01_Scenes/MazeRoom.unity @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:aeb3d59a18b6a33575598f737931085b02561dba8dc1e83a9b77f626b75423e5 -size 3357599 +oid sha256:8f649eeb59aacf4816e7d310ffdaceefe8a926da6805c1a56bd8ac0186b87fda +size 3360046 diff --git a/Assets/01_Scenes/blackjack.unity b/Assets/01_Scenes/blackjack.unity index dcb56037..632f8335 100644 --- a/Assets/01_Scenes/blackjack.unity +++ b/Assets/01_Scenes/blackjack.unity @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b593ef51335c380326430e147b400c442953ef410da8e3899d88bc8042c35c14 -size 2310050 +oid sha256:a980b6b041487636e050198fa3a53eb984193f6f9618c32b11c6d2c6bdf003bb +size 2312525 diff --git a/Assets/02_Scripts/Managers/change room manager/RandomSceneRouteManager.cs b/Assets/02_Scripts/Managers/change room manager/RandomSceneRouteManager.cs index f297b17c..54f6e665 100644 --- a/Assets/02_Scripts/Managers/change room manager/RandomSceneRouteManager.cs +++ b/Assets/02_Scripts/Managers/change room manager/RandomSceneRouteManager.cs @@ -43,12 +43,12 @@ private void OnDestroy() private void OnSceneLoaded(Scene scene, LoadSceneMode mode) { - string sceneName = scene.name.Trim(); + string loadedSceneName = scene.name.Trim(); - if (IsRoomScene(sceneName)) + if (IsRoomScene(loadedSceneName)) { - visitedScenes.Add(sceneName); - Debug.Log("ÇöÀç ¹æ ¹æ¹® ó¸®: " + sceneName); + visitedScenes.Add(loadedSceneName); + Debug.Log("¹æ¹® ó¸®µÈ ¾À: " + loadedSceneName); } } @@ -70,11 +70,11 @@ public void PrepareNextSceneChoices() string cleanSceneName = sceneName.Trim(); - // ÀÚ±â Àڽйæ Á¦¿Ü + // ÇöÀç ¹æÀº ¼±ÅÃÁö¿¡¼­ Á¦¿Ü if (cleanSceneName == currentSceneName) continue; - // ÀÌ¹Ì ¹æ¹®ÇÑ ¹æ Á¦¿Ü + // ÀÌ¹Ì ¹æ¹®ÇÑ ¹æµµ Á¦¿Ü if (visitedScenes.Contains(cleanSceneName)) continue; @@ -88,25 +88,35 @@ public void PrepareNextSceneChoices() nextSceneName1 = ""; nextSceneName2 = ""; - if (candidates.Count >= 1) + // ³²Àº ¹æÀÌ 2°³ ÀÌ»óÀÌ¸é ¹æ 2°³ ¼±ÅÃÁö Ç¥½Ã + if (candidates.Count >= 2) { nextSceneCode1 = candidates[0]; nextSceneName1 = GetDisplayName(nextSceneCode1); - } - if (candidates.Count >= 2) - { nextSceneCode2 = candidates[1]; nextSceneName2 = GetDisplayName(nextSceneCode2); } + // ³²Àº ¹æÀÌ 1°³¸é ±× ¹æ¸¸ Ç¥½Ã + else if (candidates.Count == 1) + { + nextSceneCode1 = candidates[0]; + nextSceneName1 = GetDisplayName(nextSceneCode1); - // ³²Àº ¹æÀÌ Çϳªµµ ¾øÀ¸¸é ¸¶Áö¸· ¾ÀÀ¸·Î º¸³¿ - if (candidates.Count == 0) + // Áß¿ä: ¸¶Áö¸· ¹æÀÌ ³²¾ÆÀÖÀ» ¶§´Â Á¦ÆäÅä ¹æÀ» ¼±ÅÃÁö 2·Î ³ÖÁö ¾ÊÀ½ + nextSceneCode2 = ""; + nextSceneName2 = ""; + } + // ³²Àº ¹æÀÌ 0°³¸é ±×¶§¸¸ Á¦ÆäÅä ¹æ Ç¥½Ã + else { if (!string.IsNullOrWhiteSpace(finalSceneName)) { nextSceneCode1 = finalSceneName.Trim(); nextSceneName1 = GetDisplayName(nextSceneCode1); + + nextSceneCode2 = ""; + nextSceneName2 = ""; } else { @@ -114,16 +124,6 @@ public void PrepareNextSceneChoices() } } - // ³²Àº ¹æÀÌ Çϳª»ÓÀ̸é 1¹øÀº ³²Àº ¹æ, 2¹øÀº ¸¶Áö¸· ¾ÀÀ¸·Î °¡´É - if (candidates.Count == 1) - { - if (!string.IsNullOrWhiteSpace(finalSceneName)) - { - nextSceneCode2 = finalSceneName.Trim(); - nextSceneName2 = GetDisplayName(nextSceneCode2); - } - } - Debug.Log("ÇöÀç ¾À: " + currentSceneName); Debug.Log("¹æ¹®ÇÑ ¾À ¼ö: " + visitedScenes.Count); Debug.Log("¼±ÅÃÁö 1: " + nextSceneName1 + " / " + nextSceneCode1);