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 – adding menu buttons


In this section, we are going to add a new scene with a vertical menu. This will be a typical main menu scene, which is present in many games. When we complete this scene, a player will be able to start the game, read more about the game itself, or view highscores.

First things first, we will add a scene with a basic menu to see how you can create and align buttons in Cocos2D:

  1. Open the Cocohunt project from where we left it in the previous chapter.

    Note

    Just as always, you can continue working on the project from the place we left it at the end of the previous chapter, or take the final project from the book's supporting files at Chapter_08/Cocohunt_08_Final and use it as a starter project.

    You can download the book's supporting files by visiting www.packtpub.com/support and following the instructions.

  2. Right-click on the Scenes group and create a new Objective-C class. Call this class MenuScene and make it a subclass of the CCScene class.

  3. Open the MenuScene...