This code accompanies this blog post.
In this post, we’re going to learn how to build a Timer that does something when the time elapses. The mechanism to do something will be customizable and generic enough so that you can use it to programmatically execute basically anything you can script. In the example we build, we will script the explosion animation to show when the time elapses. The Timer will be built as a standalone script which can be attached to any GameObject in Unity and reused.