Topic In Cocos2d-android game: To delete the sprite after collided with another sprite, i have used spriteRect function, but this isnt making the sprite to get removed after intersect, after lot of googling got to know that it should be deleted from parent, here's the code
CGRect ship1Rect = CGRect.make(ship1.getPosition().x - (ship1.getContentSize().width/2),
ship1.getPosition().y - (ship1.getContentSize().height/2),
ship1.getContentSize().width,
ship1.getContentSize().height);
if (CGRect.intersects(targetRect, ship1Rect))
{
parent.removeChildByTag(17, true);
}
but here parent.removeChildByTag(17, true);
in this line getting error as "parent cannot be resolved" error, where am i going wrong please can anybody tell