0
votes
1answer
138 views

CCSprite x and y comparison

I have 2 CCSprites and I want to tell if their x and y are equal I tried this: if(sam.position.x == tom.position.x && sam.position.y == tom.position.y){ NSLog(@"Hooray!"); } Although I do ...
1
vote
3answers
2k views

How to determine an irregular area of a CCSprite?

In my simple game I use boundingBox for pick coins and other stuff, but I need use irregular area detection of Sprite(with out Alpha)... There is alternative to boundingBox? Here is code: ...
1
vote
1answer
2k views

Count number of CCSprite added to a CCLayer

Does cocos2d has a method that returns the amount of CCSprites added to a CCLayer? A have SceneControlLayer object, and I added some CCSprites to it. @interface SceneControlLayer : CCLayer { } ...