2013-12-07 107 views
0

我刚刚开始使用cocos2d-x并使用3.0 alpha 1版本。我有以下的代码下面试图设置来处理onTouchBegan事件,但我得到一个错误在Xcode‘的cocos2d :: EventListenerTouch’嵌套名指定命名说“不完整的类型。cocos2d-x-3.0alpha1触摸事件?

auto _touchListener = EventListenerTouch::create(Touch::DispatchMode::ONE_BY_ONE); 
_touchListener->setSwallowTouch(true); 
_touchListener->onTouchBegan = [](Touch* touch, Event* event){ this->touchMe(touch, event); return true;}; 

回答

0

您可以使用EventListenerTouchOneByOne::create()改为

但我不知道为什么不能使用EventListenerTouch