What We’re Building

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 appear and play when the time runs out. We’ll build this Timer as a standalone script which can be attached to any GameObject in Unity and reused. You’ll also learn a bit about Coroutines and Interfaces too.

What you need to already know

• Familiarity with C# variables, classes, methods, the Unity Editor, GameObjects…


Excerpt from “Developing 2D Games with Unity”, (Apress Publishing, 2018) Available from: Amazon, Apress.

Game engines provide tremendous efficiency benefits by reducing the depth of knowledge required to make games. They can be minimal in their pre-built functionality or full-featured, allowing game developers to focus entirely on writing gameplay code. Game engines offer an incredible advantage over starting from scratch for solo developers or teams who just want to focus on making the best game possible. When building the sample game in this book, you won’t need to build complex mathematical libraries from the ground-up or figure out how to render individual pixels on-screen, because the developers who created Unity have already done that work for you. …


Derived from “Developing 2D Games with Unity”, Jared E Halpern, Apress Publishing, December 2018. https://amzn.to/2Ln0jWn

The end-goal is for the camera to track the player as they walk through a level, then stop when the cameras edge hits the edge of the map. …


Image for post
Image for post
Quick Beginners All purpose Symbolic Instruction Code IDE + Interpreter

I’ve always felt that games were a blending of technology and art, and though I spent many years studying figure drawing and painting, ultimately I decided to go to university to get a degree in Computer Science. …

About

Jared Halpern

iOS Engineer • Game Developer • Author: Developing 2D Games with Unity. https://amzn.to/2Ln0jWn (2018 Apress Publishing) • https://jaredhalpern.com

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store