Game Development Reference
In-Depth Information
NSLog(@"%@%@",
NSStringFromSelector(_cmd), decelerate ? @"YES"
: @"NO");
}
-(void) scrollViewWillBeginDecelerating:(CCScrollView
*)scrollView
{
NSLog(@"%@", NSStringFromSelector(_cmd));
// This delegate method will only run when paging is
not enabled
}
-(void) scrollViewDidEndDecelerating:(CCScrollView
*)scrollView
{
NSLog(@"%@", NSStringFromSelector(_cmd));
}
Use these methods as you see fit. For this project you won't need them. But for instance
scrollViewWillBeginDragging: and scrollViewDidEndDecelerating:
can be used to determine a page change. This would allow you to start and stop anima-
tions on the individual pages as the user navigates through the pages.
Summary
You can find the current state of the project in the 09 - Level Selection Scroll View folder.
You now know how to use the Scroll View node and how to unlock and add more levels to
the project. In the next chapter, you'll beef up the game with more physics game objects
so that you can design levels with greater variation.
Search WWH ::




Custom Search