From 3beefdbe3f10d9c281177c24119b750af3ae1f88 Mon Sep 17 00:00:00 2001 From: seozzi Date: Sun, 15 Dec 2024 17:05:09 +0900 Subject: [PATCH] =?UTF-8?q?=EC=9D=B4=EC=83=81=ED=98=84=EC=83=81=2022=20?= =?UTF-8?q?=ED=94=8C=EB=A0=88=EC=9D=B4=EC=96=B4=EA=B0=80=20=EC=95=84?= =?UTF-8?q?=EB=9E=98=EB=A1=9C=20=EB=96=A8=EC=96=B4=EC=A1=8C=EC=9D=84=20?= =?UTF-8?q?=EB=95=8C=20=EC=95=88=20=EC=A3=BD=EB=8A=94=20=EB=B2=84=EA=B7=B8?= =?UTF-8?q?=20=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Anomaly22Manager.cs | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly22Manager.cs b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly22Manager.cs index caa22f7..e61e066 100644 --- a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly22Manager.cs +++ b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly22Manager.cs @@ -31,13 +31,24 @@ void Start() floorTiles = new List(floorTilesArray); platformTile = FindPlatformTile(); - StartCoroutine(AddBoxColliders()); // 타일 각각에 Collider 추가 - StartCoroutine(DestroyFloorBoxCollider()); // Floor Parent의 통일된 Collider 제거 + StartCoroutine(StartWithDelay()); + } + + private IEnumerator StartWithDelay() + { + yield return new WaitForSeconds(5f); + + StartCoroutine(InitializeCollidersAndDestroyParentCollider()); StartCoroutine(CountSeconds()); StartCoroutine(TriggerPlatformFall()); StartCoroutine(TriggerRandomTileShakeAndFallWithInterval()); } + private IEnumerator InitializeCollidersAndDestroyParentCollider() + { + yield return StartCoroutine(AddBoxColliders()); + yield return StartCoroutine(DestroyFloorBoxCollider()); + } private Transform FindPlatformTile() { @@ -98,7 +109,7 @@ private IEnumerator AddBoxColliders() Vector3 originalCenter = tileCollider.center; tileCollider.size = new Vector3(originalSize.x, originalSize.y, originalSize.z * 20); // Change Y value to 3 - tileCollider.center = new Vector3(originalCenter.x, originalCenter.y, originalCenter.z - originalSize.z * 20); // Adjust center for correct positioning + tileCollider.center = new Vector3(originalCenter.x, originalCenter.y, originalCenter.z - originalSize.z * 10); // Adjust center for correct positioning } } yield return null; @@ -116,7 +127,7 @@ private IEnumerator CountSeconds() void Update() { // 아래로 떨어졌는지 확인해서 Game Over 처리 - if (playerController.transform.position.y < -1f && !isPlayerDead && false) + if (playerController.transform.position.y < -1f && !isPlayerDead) { playerController.Sleep(); isPlayerDead = true;