7. Main Menu, Level Completed, and Credits Scenes

So far in this book you have built a full working scene for Ole the Viking to explore. He has to battle evil robots and figure out a way to stop them from spawning. In this chapter you learn about Cocos2D menus and how to create and link multiple scenes. By the end of this chapter you will have Space Viking set up to start on a main menu, show three different levels for Ole to explore, and show a level complete screen once Ole has killed all the enemies or died trying. If you are ready, read on.

Scenes in Cocos2D

In Chapter 1, “Hello, Cocos2D,” you learned that each distinct level or view is stored inside of a CCScene and that the Cocos2D Director is in charge of running one scene at a time. Up ...

Get Learning Cocos2D: A Hands-On Guide to Building iOS Games with Cocos2D, Box2D, and Chipmunk now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.