Skip to content

Commit

Permalink
Merge branch 'refactoring' into ref/chaehwan/design-pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
Prown0 committed Dec 21, 2024
2 parents a5357d4 + eb9e459 commit 083b1cf
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 21 deletions.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@ public override bool StartAnomaly()
// Start the gradual swaying with delay
StartCoroutine(DelayedStartSwaying());

// Stage always clears after experiencing the anomaly
GameManager.Instance.SetStageClear();

// Find the player object and its Rigidbody
player = GameObject.Find("Player");
if (player != null)
Expand Down Expand Up @@ -143,7 +140,7 @@ private IEnumerator SwayClassroom()
yield return null; // Wait for the next frame
}

ResetAnomaly();
GameManager.Instance.SetStageClear(); // ResetAnomaly 간접 호출
}

private IEnumerator GradualReset()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ public class Anomaly30Controller : AbstractAnomalyObject
public override string Name { get; } = "Anomaly30Controller";
public GameObject[] windows;
private GameObject player;
private GameManager gameManager;
private Camera mainCamera;
public VideoClip stormVideoClip;
public AudioClip stormAudioClip;
Expand All @@ -24,7 +23,6 @@ public override bool StartAnomaly()
{
bool res = base.StartAnomaly();

gameManager = GameObject.Find("GameManager").GetComponent<GameManager>();
player = GameObject.Find("Player");
mainCamera = Camera.main;

Expand All @@ -49,6 +47,8 @@ public override bool StartAnomaly()
// 20초 후 창문 열기 중지
StartCoroutine(EndWindowsOpeningAfterTime(20f));

GameManager.Instance.SetStageClear();

return res;
}

Expand All @@ -58,7 +58,6 @@ public override bool ResetAnomaly()

isAnomalyStopped = true;
StopAnomaly();
gameManager.SetStageClear();

thunderstorm.DestroyThunderstormScreen(); // 비디오 화면 제거
CloseAllWindows();
Expand Down

0 comments on commit 083b1cf

Please sign in to comment.