ios - Sprite Kit: Count of SKSpriteNodes on screen -
It sounds like a really simple question, but I can not find the answer anywhere. I am making a game using the Sprite Kit, and I want to calculate how many SKNodes are on the screen. I can count on the lower right corner of my debugging information, but I'm not sure how to use it as an integer that I can use in the program. Any suggestions? Apple Docs says, "One SKNN object represents a view of the content in the Sprite Kit."
" Spirit node tree has a visual node ... "
Then, use the following statement in your SKEN class, see if it outputs the correct number.
NSLog (@ "% elu", (unsigned long) [child counting].;);
Comments
Post a Comment