Skip to content

Commit

Permalink
Anomaly27(magnifying clock) revised
Browse files Browse the repository at this point in the history
# 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
없음
  • Loading branch information
psy020529 committed Nov 25, 2024
1 parent 9f1efae commit 959859d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 15 deletions.
4 changes: 3 additions & 1 deletion 302/Assets/Scripts/AnomalyManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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만 보장
Expand Down Expand Up @@ -48,7 +49,8 @@ private void GenerateAnomalyList()
}
else
{
anomaly = SpecificAnomalyNum;
if(checkIntersect && i%2==1) anomaly = 0;
else anomaly = SpecificAnomalyNum;
}
anomalyList.Add(anomaly);
}
Expand Down
14 changes: 0 additions & 14 deletions 302/Assets/Scripts/SpecificAnomalyManager/Anomaly27Manager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down

0 comments on commit 959859d

Please sign in to comment.