Reputation: 329
Now started porting game from Cocos2d to Sprite-Kit as Cocos2d not offers box2d physics and new version of Cocos2d 3.0 has less features.
Got struct with some place while porting it to Sprite-Kit. Is there any way to get child node from parent in SpriteKit ?
(CCSprite *)[self getChildByTag:2022]; //cocos2d syntax
How can I achieve this in Sprite-Kit ?
Upvotes: 0
Views: 381
Reputation: 4923
See Apple documentation on SKNode:
– enumerateChildNodesWithName:usingBlock:
Also see SKNode's userData property.
Upvotes: 2