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); } }