Book Image

Learning Cocos2d-x Game Development

By : Siddharth Shekar
Book Image

Learning Cocos2d-x Game Development

By: Siddharth Shekar

Overview of this book

Table of Contents (19 chapters)
Learning Cocos2d-x Game Development
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Chapter 8. Adding Main and Option Menu Scenes

In this chapter, we will be finally adding the main and option menu scenes to the game. Till now, when the game launches, it directly goes to the HelloWorldScene. Instead, we create the MainMenuScene that will be loaded first, which will have the buttons to open the game and options menu. Pressing the play button will launch the HelloWorldScene, and pressing the options button will open up the Options scene, where the player will be able to reset the score. A home button will be added to the HelloWorldScene and Options scene so that the player can get back to the MainMenuScene.

The topics covered in this chapter are as follows:

  • Creating the main menu scene

  • Loading the main menu scene at start of the app

  • Creating the Options scene

  • Changing the name of the app