June 2014
Beginner
256 pages
5h 38m
English
Chapter 5
More Animated Sprites: “Enemies” and “Bonuses”
The Opposition
So far, this game is a solo endeavor of running and jumping endlessly without any apparent objective. In the words of my little cousin, “It’s lame!” That’s just a wee bit pessimistic, but it is a fairly accurate assessment.
Well, it’s time to change all that. In this chapter, you’ll generate some bad guys to liven things up a bit.
Before doing so, you need to move some code around to increase readability and organization. You’ll pull the ledge and brick base creation out of the initWithSize method and into a separate method called createSceneContents, which is located in the SKBGameScene.m file and inserted immediately below initWithSize:
[self addChild:backdrop]; ...