I use CGRectIntersectsRect()
to see whenever a CCSprite
collides with another CCSprite
:
- (void)update3
{
for (CCSprite *sprite in _monsters)
{
if (CGRectIntersectsRect(_rocket.boundingBox, sprite.boundingBox))
{
NSLog(@"Collide");
}
}
}
This fires the log as long as the sprites touches each other, I just want to detect the first touch. Is this possible?