Game Development Reference
In-Depth Information
as she sees fit, and they will appear the same way in the game. Just save the images, pub-
lish, and run the app to see the new layout in the game.
Designing the Background CCB
Since you may want to re-use the menu's background layer in other scenes, it's a good
idea to design it in a separate layer.
Right-click the UserInterface folder—the folder, not the Sprite Sheet of the same
name—and select New File . Name this new document MainMenuBackground.ccb , set its
type to Layer with the default 568x384 size, and then click Create .
As usual, the first thing to do to a Layer CCB's root node is set its Content size types to %
and Content size values to 100 . This ensures the layer properly scales with varying screen
resolutions while remaining centered on all devices.
Add a regular Node from the Node Library View onto the MainMenuBackground.ccb
stage. Set the node's position types to % and its values to 50 so that the node is centered
on the layer. You may also want to rename the node in the timeline to background . The
background node will be the container for the background images.
You can now drag and drop the background images from the Tileless Editor View onto the
background node. Add the images in this order (see also Figure 7-4 ):
M_bg
M_monsters
M_frontsmoke
Search WWH ::




Custom Search