你可以试试这样
头文件中添加
Array* _touches;
.cpp中(也可以添加到ccTouchEnded中)
ccTouchBegan(Touch* touch, Event* event)
{
if(_touches->count() >= 2)
{
_touches->removeAllObjects();
}
_touches->addObject(touch);
}
draw()
{
cocos2d::Layer::draw();
if(_touches->count() == 2)
{
//画直线
}
}
可能是比较难画画吧,现在的手上有一些地方不清楚,可以去别的地方找一下