Hi all! I have a question about the Glitch Garden code in our LevelController script. I just noticed that it’s possible for our IEnumerator HandleWinCondition() and public void HandleLoseCondition() methods to happen at the exact same time.
If the defenders destroy all enemies except the exact number of enemies that equals the number of lives remaining, and the remaining enemies make their way to the Damage Collider, they’ll be destroyed and call both methods because the number of enemies will be 0 and the lives text will be at 0 as well. When this happens, both the Level Complete Canvas and Level Lost Canvas overlays will appear.
I’ve been trying to disable the Level Complete Canvas in this instance, so that only the Level Lost Canvas appears, but haven’t been able to come up with the right way to do it. Any help would be appreciated! Also, I apologize if this issue has already been brought up and resolved.