我新建了个精灵用sprite->setRotation(30.0f);旋转了角度,之后要怎么判断是否点击到这个精灵啊?
bool isTouchInside(CCTouch* touch)
{
CCPoint touchLocation = touch->getLocation(); // Get the touch position
touchLocation = sprite->getParent()->convertToNodeSpace(touchLocation);
CCRect bBox=sprite->boundingBox();
return bBox.containsPoint(touchLocation);
}