From 6da2daf64bab9e307730e8ef87c24b41e18c70db Mon Sep 17 00:00:00 2001 From: Prown0 <100746335+Prown0@users.noreply.github.com> Date: Mon, 16 Dec 2024 21:11:23 +0900 Subject: [PATCH] Bug fix and add feature for test --- 302/Assets/Scenes/DefaultGameScene.unity | 4 ++-- 302/Assets/Scripts/AnomalyManager.cs | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/302/Assets/Scenes/DefaultGameScene.unity b/302/Assets/Scenes/DefaultGameScene.unity index 52dbdbe..eeba3a3 100644 --- a/302/Assets/Scenes/DefaultGameScene.unity +++ b/302/Assets/Scenes/DefaultGameScene.unity @@ -43759,9 +43759,9 @@ MonoBehaviour: - {fileID: 5650449145146738954, guid: 11a50fb479ce40a4698c9b8f9816f567, type: 3} - {fileID: 3233071982878084982, guid: 5156428cd2b781d4dabf6a30befa7685, type: 3} - {fileID: 5605359256125054964, guid: 48c8f10abe45bef4098efae902701f34, type: 3} - checkSpecificAnomaly: 1 + checkSpecificAnomaly: 0 checkIntersect: 0 - SpecificAnomalyNum: 11 + SpecificAnomalyNum: 0 currentAnomalyInstance: {fileID: 8678062959089499939, guid: 6aadfcd777444a24180cf51012c6e89c, type: 3} --- !u!4 &1964216256 Transform: diff --git a/302/Assets/Scripts/AnomalyManager.cs b/302/Assets/Scripts/AnomalyManager.cs index 4bcd611..2c2d64c 100644 --- a/302/Assets/Scripts/AnomalyManager.cs +++ b/302/Assets/Scripts/AnomalyManager.cs @@ -64,10 +64,10 @@ private void GenerateAnomalyList() anomalyList.Add(anomaly); } - if(!hasHighAnomaly) + if(!hasHighAnomaly && !checkSpecificAnomaly) { int randomIndex = random.Next(0, AnomalyCount); - int highAnomaly = random.Next(21, 32); + int highAnomaly = random.Next(21, 31); anomalyList[randomIndex] = highAnomaly; } Debug.Log($"[AnomalyManager] Generated Anomaly List: {string.Join(", ", anomalyList)}"); @@ -122,6 +122,8 @@ public void ResetAnomaliesOnFailure() void Update() { if (Input.GetKeyDown(KeyCode.Alpha1)) { + GameManager.Instance.SetStageNoClear(); + checkSpecificAnomaly = true; SpecificAnomalyNum++; if (SpecificAnomalyNum > 30) { SpecificAnomalyNum = 30; @@ -129,6 +131,8 @@ void Update() ClockController.Instance.SetTimeForAnomaly(SpecificAnomalyNum); } else if (Input.GetKeyDown(KeyCode.Alpha2)) { + GameManager.Instance.SetStageNoClear(); + checkSpecificAnomaly = true; SpecificAnomalyNum--; if (SpecificAnomalyNum < 0) { SpecificAnomalyNum = 0;