quick 中 CCArmature事件响应区域错误。
问题来源于这个链接 http://www.cocoachina.com/bbs/read.php?tid=219144
查看了底层quick事件响应逻辑, quick 是通过 getCascadeBoundingBox() 来判断事件响应区域的。 但是 CCArmature 比较特殊,不能直接按照 CCNode里面的getCascadeBoundingBox() 来实现。
修改如下:
CCRect CCArmature::getCascadeBoundingBox(void)
{
CCRect cbb;
if (m_cascadeBoundingBox.size.width > 0 && m_cascadeBoundingBox.size.height > 0)
{
// if cascade bounding box set by user, ignore all childrens bounding box
cbb = m_cascadeBoundingBox;
}
else
{
cbb = boundingBox();
if (m_pParent != NULL)
{
cbb = CCRectApplyAffineTransform(cbb, m_pParent->nodeToWorldTransform());
}
}
return cbb;
}
