Time for action – using the scroll view to select levels

It is nice to have good transitions from the menu, but currently, we can't even start the game since we display almost an empty scene for level selection. The reason for this whole scene is that in some games, you have multiple levels. I'm sure you can remember some popular game where you scroll between levels or game types.

Sometimes, the game can have so many levels that they don't fit on one screen. Of course, we could create different scenes and plan transitions just as we did on the menu scene, but in most cases, we just need a scroll view. This is exactly what we're going to do now; we're going to add a scroll view. Refer to the following steps:

  1. Open the LevelSelectScene.m file, and ...

Get Learning iPhone Game Development with Cocos2D 3.0 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.