Game Development Reference
In-Depth Information
Figure 2-15 . CCNode properties are used by all nodes
The Visible check box is self-explanatory, and the Name text field can be used to give a
node a custom name to identify it in code.
The Position setting is in points, not pixels. A Retina and non-Retina iPad, for instance,
have the same point dimensions of 1024 x 768 points. This makes the position universal
for all devices. To further support alignment and perhaps personal preference, you can
change a node's reference corner. (See Figure 2-16 .) By default, it is set to Bottom-left,
which means the node's position is relative to the lower left corner of the root node.
Change it to Top-left and the node's position will be the same as that of a UIView, which
also considers views to be positioned relative to the upper-left corner of the view, layer, or
screen.
Figure 2-16 . The Corner Alignment settings for the Position property
Search WWH ::




Custom Search