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

Get Learning Objective-C by Developing iPhone Games now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.