Game Development Reference
In-Depth Information
the Item Properties pane, the eye column can be used to hide nodes within
SpriteBuilder. When you publish and run the app, nodes without the eye symbol
will still be visible in the app.
Whether you use your own images, the one's provided with the topic, or just color nodes,
keep this in mind: it's important to add a couple visible nodes to each layer and position
them so that they are at least partially inside each layer's extents, as visualized by the col-
or nodes you've added in the previous step. Otherwise, you won't be able to enjoy the par-
allaxing effect.
The result of your background layer editing operation might resemble something like
what's shown in Figure 3-15 .
Figure 3-15 . Background1.ccb contents after adding graphics to parallax layers
Before you get to program the parallax scrolling, open Level1.ccb in SpriteBuilder.
At this point, you should remove any extraneous nodes from Level1.ccb that you may
have added while testing scrolling. Also, remove the original background gradient node
since that's now part of the Background1.ccb. To delete a node, select it and use Edit
Delete or press Backspace. You should end up with an empty stage with just the player
node on it. If you accidentally removed the player, just drag and drop it from the Tileless
Editor View onto the stage once more.
Switch to the Tileless Editor View. In the list should be a section labeled Parallax , which
contains a preview image of Background1.ccb. For brevity, I've unchecked all the Filter
folders currently not needed in Figure 3-16 .
Search WWH ::




Custom Search