I’m working on HTML5 games for the time being. During that I came across a very basic issue. If you want to test your HTML5 game in your local system, well you can’t. At least not directly.
You know what an Update method does. It loops indefinitely after the Start method is called. But sometimes we want some code to loop for a fixed amount of time. After that it should stop looping. Or may be we don’t want something to run every frame, but intermittently. So there’s a need for another update-like method. Here comes the power of coroutines. Coroutines are like methods that has the ability to pause-and-resume. Please google about it and learn to use it in different situations. It will help you a lot.