From b3d28dd2c9622c67d97e72b313295c41ad2475ff Mon Sep 17 00:00:00 2001 From: Miguel Astor Date: Tue, 4 Aug 2026 02:10:52 -0400 Subject: [PATCH] TO SQUASH: Added ooze ball halt logic. --- Assets/Scripts/Game/Balls/OozeBall.cs | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/Assets/Scripts/Game/Balls/OozeBall.cs b/Assets/Scripts/Game/Balls/OozeBall.cs index 9c93ca5..784c245 100644 --- a/Assets/Scripts/Game/Balls/OozeBall.cs +++ b/Assets/Scripts/Game/Balls/OozeBall.cs @@ -75,7 +75,7 @@ public class OozeBall : MonoBehaviour } } - void Split() + public void Split() { StartCoroutine(SplitCoroutine()); } @@ -99,9 +99,19 @@ public class OozeBall : MonoBehaviour Destroy(gameObject); } - void Halt() + public void Halt() { + StartCoroutine(HaltCoroutine()); + } + + private IEnumerator HaltCoroutine() + { + spriteRenderer.enabled = false; audioSource.PlayOneShot(stoppedSound); - // TODO: Implement the logic for transforming the OozeBall into a basic ball. + spawner.SpawnBallOfType("BasicBall", transform.position); + + yield return new WaitForSeconds(0.53f); + + Destroy(gameObject); } }