One screen has one scene. A scene is a container that holds Sprite, Labels, and other objects. For example, a scene can be a title scene, a game scene, or an option menu scene. Each scene has multiple layers. A layer is a transparent sheet similar to Photoshop's layer. Objects that added to layers are displayed on the screen. In this chapter, we will explain how to use the Scene
class and the Layer
class and how to transition between scenes. Finally, by the end of this chapter, you will be able to create original scenes and layers.
Cocos2d-x Cookbook
By :
Cocos2d-x Cookbook
By:
Overview of this book
Table of Contents (18 chapters)
Cocos2d-x Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Free Chapter
Getting Started with Cocos2d-x
Creating Sprites
Working with Labels
Building Scenes and Layers
Creating GUIs
Playing Sounds
Working with Resource Files
Working with Hardware
Controlling Physics
Improving Games with Extra Features
Taking Advantages
Index
Customer Reviews