Hello,
I recently have an issue, where I want to stop a Coroutine, if the bool secondChanceUsed is equal to true. But I have no idea to do so, because StopCouroutine() will stop the whole coroutine and yield break will not let calling the win() function.
I hope you can help me out with this and thanks in advance!
` IEnumerator countdown(){
yield return new WaitForSeconds(5f);
if(!secondChanceUsed){
enableLooseUI();
disablePreLooseUI();
updateTotalPoints();
pointsystem.resetLocalscore();
}
else{
// Stop waiting for 5 Seconds and continue with win();
}`