I’m using cocos2d and I want to see if a specific string is in the array’s element. Here is the element, which is a CCSprite object:
<theSwift = 08A6EA70 | Rect = (0.00,0.00,27.00,75.00) | tag = 2 | atlasIndex = -1>
I am spawning “monsters” and one type of monsters get the tag = 1 and some get the tag = 2. Is it possible to check if the last monster spawned got the tag = 2 in the element above?
If that object is in an array, you could use an NSPredicate to find the object with a certain tag:
EDIT: Since you are using cocos2d, its as simple as this: