From 959859d79ecc1614319122759debc4c2ca47dcb4 Mon Sep 17 00:00:00 2001 From: psy020529 <163077953+psy020529@users.noreply.github.com> Date: Mon, 25 Nov 2024 17:18:30 +0900 Subject: [PATCH] Anomaly27(magnifying clock) revised MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # PR Title [Magnifying Clock 활성화 시, 기본 시계 비활성화 문제 해결] ## Related Issue(s) AnomalyManager, Anomaly27Manager ## PR Description [이상현상 27 발현 후, 기본 시계가 보이지 않는 문제를 해결하기 위해 몇 가지 수정했습니다. ] ### Changes Included - [ ] Added new feature(s) - [x] Fixed identified bug(s) - [x] Updated relevant documentation ### Notes for Reviewer Any specific instructions or points to be considered by the reviewer. --- ## Reviewer Checklist - [ ] Code is written in clean, maintainable, and idiomatic form. - [ ] Automated test coverage is adequate. - [ ] All existing tests pass. - [ ] Manual testing has been performed to ensure the PR works as expected. - [ ] Code review comments have been addressed or clarified. --- ## Additional Comments 없음 --- 302/Assets/Scripts/AnomalyManager.cs | 4 +++- .../SpecificAnomalyManager/Anomaly27Manager.cs | 14 -------------- 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/302/Assets/Scripts/AnomalyManager.cs b/302/Assets/Scripts/AnomalyManager.cs index e91a15b..17c8548 100644 --- a/302/Assets/Scripts/AnomalyManager.cs +++ b/302/Assets/Scripts/AnomalyManager.cs @@ -11,6 +11,7 @@ public class AnomalyManager : MonoBehaviour private const int AnomalyCount = 8; // 사이즈 8 private System.Random random = new System.Random(); public bool checkSpecificAnomaly; + public bool checkIntersect; public int SpecificAnomalyNum; public GameObject currentAnomalyInstance; // 현재 활성화된 이상현상 인스턴스 // 하나의 AnomalyManager만 보장 @@ -48,7 +49,8 @@ private void GenerateAnomalyList() } else { - anomaly = SpecificAnomalyNum; + if(checkIntersect && i%2==1) anomaly = 0; + else anomaly = SpecificAnomalyNum; } anomalyList.Add(anomaly); } diff --git a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly27Manager.cs b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly27Manager.cs index 27e977e..9e23236 100644 --- a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly27Manager.cs +++ b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly27Manager.cs @@ -4,24 +4,10 @@ public class Anomaly27Manager : MonoBehaviour { - public string targetObjectName = "clock"; // 비활성화할 게임 오브젝트 이름 public GameObject clockPrefab; // 소환할 프리팹 private void Start() { - // 특정 이름의 게임 오브젝트 찾기 - GameObject targetObject = GameObject.Find(targetObjectName); - if (targetObject != null) - { - // 게임 오브젝트 비활성화 - targetObject.SetActive(false); - Debug.Log($"Anomaly 27: Found and deactivated target object {targetObjectName}"); - } - else - { - Debug.LogWarning($"Anomaly 27: Target object {targetObjectName} not found in the scene."); - } - // 프리팹 소환 if (clockPrefab != null) {