Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Haha I'll call it a feature 😅 yea I tried but for some reason coroutines were being weird for it.  Glad you enjoyed the game tho

(3 edits) (+1)

Coroutines are awkward to be fair. Did you try using something like this:

private IEnumerator coroutine;

//starting the coroutine

if (coroutine  == null)
{

     coroutine = YourIEnumerator();
     StartCoroutine(coroutine);

}

// Stopping the coroutine
StopCoroutine(coroutine);      
coroutine = null;

Neat! No I didnt null or stop the coroutine like that. The main problem was the death animation and particles were getting called continuously while the coroutine was waiting. In the end I left it as it wasn't essential to the gameplay.