I am fine tuning my Laser Defender project to include features outside to the lecture. I have been successful in implementing what I want, for the most part. For one, I’ve given up on trying to implement since I can’t seem to find a solution. For the one below, I am still hoping a solution can be found.
One of the features is an upgradeable player ship. I have the coding completed to upgrade my ship. And downgrade it when hit. But, now I have an issue.
I have a PowerupSpawner.cs that uses a do {coroutine} while looping to spawn ship upgrade power-ups. When the ship has reached it’s maximum upgrade level, I need the upgrade power-ups to stop spawning until the ship level gets downgraded by taking a hit.
Theoretically, I want to toggle looping ‘off.’ And, then back ‘on.’ I need this toggle to be made in the Player.cs. I’ve searched the Unity manual and googled the scenario. I can’t find a solution that actually works.
Am I not thinking in the right direction? Or is what I am trying to accomplish not possible to begin with?