Wednesday, 15 August 2012

ios - The Functionality of CCNode.children - Is this Redundant Code? -


In the original hit test function of a template for the Cocos 2D game, the original author used the following to determine Did what to prepare for the hit test during the run loop. (

Has any person expanded about the nature given in the list? children? More specifically, if the statement is really necessary in the above code?

. The child will return an array of all the nodes added on the node as a child.

If you type [addChild: node1]; on self

  [Self combine: node 2]; [Self linking child: node 3]; [Self add child: node 4];   

then children will return these 4 nodes

  NSLog (@ "children:% @", children themselves);   

... your console will show to 4 kids

No comments:

Post a Comment