Sorry if this sounds trivial. I just didn’t get it. How can I determine if a particular sprite already exists in the layer? Basically, I need to check this before deciding whether to add it to the layer.
if ( [myNode.children indexOfObject:sprite] == NSNotFound) {
// you can add the code here
}
Sorry, if this sounds trivial. I just didn’t get it. How can I determine if a particular sprite already exists in the layer? Basically, I need to check this before deciding whether to add it to the layer.
if ([myNode.children indexOfObject:sprite] == NSNotFound) {
// you can add the code here
}