初始化时候,用的是SwallowsTouches为false。在touch执行中需要修改SwallowsTouches为true.
由于此时 pDelegate已经存在,同时m_bLocked为true。
if (ccCArrayContainsValue(m_pHandlersToRemove, pDelegate))
{
ccCArrayRemoveValue(m_pHandlersToRemove, pDelegate);
return;
}
m_pHandlersToAdd->addObject(pHandler);
m_bToAdd = true;
只做了删除,没有被加载。
而在CCLayer里删除之后,做了加载
if( m_bTouchEnabled){
setTouchEnabled(false);
setTouchEnabled(true);
}