Game Development Reference
In-Depth Information
Listing 14-11
.
Output of walkSceneGraph
walk tree: -> <CCScene = 0x10a620550 | Name = (null)>
0x10a620550
walk tree: ---> <CCNode = 0x10a36a130 | Name = > 0x10a36a130
walk tree: ----> <CCNode = 0x10a36cad0 | Name = background>
0x10a36cad0
walk tree: -----> <CCNodeGradient = 0x10a36d710 | Name = >
0x10a36d710
walk tree: -----> <CCSprite = 0x10a36e850 | Rect
= (0.00,0.00,593.50,406.00) |
tag = > 0x10a36e850
walk tree: -----> <CCNode = 0x10a36fe00 | Name = >
0x10a36fe00
walk tree: ------> <CCNodeColor = 0x10a370690 | Name = >
0x10a370690
walk tree: ------> <CCSprite = 0x10a371780 | Rect
= (916.5,0.5,102.0,42.0) |
tag = > 0x10a371780
walk tree: ------> <CCSprite = 0x10a374a80 | Rect
= (916.5,0.5,102.0,42.0) |
tag = > 0x10a374a80
This can be helpful in determining whether a given node is in the place in the hierarchy
that you expect it to be. If it isn't, this tells you where it is or whether it's not there at all.
In this case, the
CCScene
has a single
CCNode
child node, which in turn has a child
CCNode
whose name is
background
.
Tip
The formatting and logged properties may not suit all purposes. You may
want to make a copy of the
walkSceneGraph
method found in the
CCNode+Debug.m
file and modify it to generate the output you find more
helpful.
Debugging Advice
Search WWH ::
Custom Search