Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Anomaly27(magnifying clock) revised #150

Merged
merged 1 commit into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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