objective c - Calling SKSpriteNodes based on of their name -


in spritekit game have several sprites different name properties .

for (int = 0; < 10; i++) {         skspritenode *sprite = [skspritenode spritenodewithimagenamed:@"png"];         sprite.name = [nsstring stringwithformat:@"name%i",i];         sprite.position = cgpointmake(100, 100);         [self addchild:sprite];     } 

is possible call 1 of these sprites based on name?

i found looking for.. use

[self childnodewithname:@"name"]; 

to search specific node.


Comments

Popular posts from this blog

python - Installing PyDev in eclipse is failed -

PHP OOP-based login system -

c# - Nested Internal Class with Readonly Hashtable throws Null ref exception.. on assignment -