Chapter 5. Shooting Gallery – Working with Animations and Tweens

Now that we have some games under our belt, I thought it'd be a good idea for us to dive into how to make our games feel more "alive." One of the ways that we can do this is by adding animations to our worlds, so things aren't just static.

There are many different ways in which you can create animation, and in this chapter, we will be covering three different ways, using Unity's built-in animations, using a tweening library such as iTween, and moving objects ourselves via code.

Project overview

This project will teach us how to create a simple shooting gallery game in which players can shoot at targets before the time is up. In the meantime, we'll learn the various ways to animate things such as by Unity's built-in animations or a Tweening library such as iTween. Finally, we will use PlayerPrefs to set a new high score.

Your objectives

This project will be split into a number of tasks. It will be a simple step-by-step process from beginning to end. Here is the outline of our tasks:

  • Creating the environment
  • Adding our targets
  • The animation via Unity's animation system
  • The animation using iTween
  • Creating moving targets
  • Creating many targets
  • Starting/ending the game
  • Saving our high score
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset