auto listener = EventListenerKeyboard::create();
listener->onKeyPressed = CC_CALLBACK_2(MainScene::KeyPressed, this);
_eventDispatcher->addEventListenerWithSceneGraphPriority(listener, this);
代码这么写的,结果老是在
void EventDispatcher::addEventListener(EventListener* listener)
{
if (_inDispatch == 0)
单步进去 发现_inDispatch根本没内容。。。为啥啊之前在别的地方进入到这个函数一次,是不是哪里没有释放?