Book Image

Learning iPhone Game Development with Cocos2D 3.0

By : Kirill Muzykov
Book Image

Learning iPhone Game Development with Cocos2D 3.0

By: Kirill Muzykov

Overview of this book

Table of Contents (19 chapters)
Learning iPhone Game Development with Cocos2D 3.0
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Time for action – creating GameScene


As we're going to work on this project for some time, let's keep everything clean and tidy by performing the following steps:

  1. First of all, let's remove the following files as we won't need them:

    • HelloWorldScene.h

    • HelloWorldScene.m

    • IntroScene.h

    • IntroScene.m

  2. We'll use groups to separate our classes. This will allow us to keep things organized. To create a group in Xcode, you should right-click on the root project folder in Xcode, Cocohunt in our case, and select the New Group menu option (command + alt + N). Refer to the following sceenshot:

    Creating a new group

  3. Go ahead and create a new group and name it Scenes. After the group is created, let's place our first scene in it.

  4. We're going to create a new Objective-C class called GameScene and make it a subclass of CCScene. Right-click on the Scenes group that we've just created and select the New File option.

    Note

    Right-clicking on the group and selecting New File instead of using File | New | File will place...