O'Reilly logo

Learning Objective-C by Developing iPhone Games by Amy M. Booker, Joseph D. Walters

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating our enemies

Cool! That was a great start. Now we need a bunch of enemies. We are going to start by creating a new class for our enemies. Under your File menu, add a new file. Choose the file type as Objective-C class, as follows:

Creating our enemies

Name your class Enemy and set the subclass to NSObject as shown in the following screenshot:

Creating our enemies

Save your file to the default project directory as shown in the following screenshot:

Creating our enemies

Once this is done, we will link the

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required