I am trying to detect a collision between two sprites and am using this code:
CCNode *sprite = [self getChildByTag:kTagBall];
CCNode *enemy = [self getChildByTag:kTagEnemy];
if (CGRectIntersectsRect(sprite.frame, enemy.frame)) {
//Do something
}
When I build it, it says there is no such property called frame. What is the cocos2d equivalent to this set of code?