Book Image

Learning Unity iOS Game Development

Book Image

Learning Unity iOS Game Development

Overview of this book

Table of Contents (14 chapters)
Learning Unity iOS Game Development
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
6
Main Menu, iAds, Leaderboards, Store Purchases, and Achievements
Index

Creating the obstacle


The obstacle will consist of two parts. There will be an image of an axe that we will rotate around and a base image that the axe will rotate around. The reason we will be controlling the rotation of the axe instead of using another animation is that it would be more complicated to scale Box Collider 2D on the object to always fit the rotating bounds of the axe. Perform the following steps:

  1. To begin with, navigate to the Assets folder, right-click on it, select Create and then Folder.

  2. Name the folder Obstacle and open this folder.

  3. Now, right-click on the Obstacle folder and click on Import New Asset….

  4. Navigate to the Art files for the book and open the ChapterThree_Obstacle folder.

  5. Then, select Obstacle_Axe.png and click on Import.

  6. Now, right-click on the Obstacle folder again and click on Import New Asset….

  7. Select Obstacle_Axe_Base.png and click on Import.

  8. Select both the imported files in the Obstacle folder (click on one and Ctrl + left-click on the other).

  9. Now, select Filter...