标签:
auto listener = EventListenerTouchOneByOne::create();// listener->onTouchBegan = CC_CALLBACK_2(GameMenuScene::touchBegin,this); _eventDispatcher->addEventListenerWithSceneGraphPriority(listener, this);
bool GameMenuScene::touchBegin(CCTouch * touch,CCEvent *event) { CCPoint pt = touch->getLocationInView(); pt = Director::getInstance()->convertToGL(pt); if(sprite->getBoundingBox().containsPoint(pt)) { CCLog("CLick"); } return true; }
标签:
原文地址:http://www.cnblogs.com/xyida/p/4305947.html