Skip to content

Commit

Permalink
Bug fix and add feature for test
Browse files Browse the repository at this point in the history
  • Loading branch information
Prown0 committed Dec 16, 2024
1 parent d0e9844 commit 6da2daf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions 302/Assets/Scenes/DefaultGameScene.unity
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
8 changes: 6 additions & 2 deletions 302/Assets/Scripts/AnomalyManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)}");
Expand Down Expand Up @@ -122,13 +122,17 @@ public void ResetAnomaliesOnFailure()
void Update()
{
if (Input.GetKeyDown(KeyCode.Alpha1)) {
GameManager.Instance.SetStageNoClear();
checkSpecificAnomaly = true;
SpecificAnomalyNum++;
if (SpecificAnomalyNum > 30) {
SpecificAnomalyNum = 30;
}

ClockController.Instance.SetTimeForAnomaly(SpecificAnomalyNum);
} else if (Input.GetKeyDown(KeyCode.Alpha2)) {
GameManager.Instance.SetStageNoClear();
checkSpecificAnomaly = true;
SpecificAnomalyNum--;
if (SpecificAnomalyNum < 0) {
SpecificAnomalyNum = 0;
Expand Down

0 comments on commit 6da2daf

Please sign in to comment.