Time for action – adding the background sprite
We will start by adding a good-looking background image instead of a boring black screen by performing the following steps:
- Open the
Cocohunt
project in Xcode if you've closed it. - Before we can add background sprite to our game scene, we need to add an image file with the background to our project.
- Right-click on the
Resources
group in the Xcode Project Navigator on the left of the screen and choose the New Group option in the menu to create a subgroup. Call this groupBackgrounds
. - Open the
Chapter_04/Assets/Backgrounds
folder and drag the following files (all files in the folder) over to theBackgrounds
group that you just created:game_scene_bg.png
game_scene_bg-hd.png
game_scene_bg-iphone5hd.png
Refer ...
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.