Cocos2d触摸:多点触摸

前端之家收集整理的这篇文章主要介绍了Cocos2d触摸:多点触摸前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
  
  
// 多点触摸 Size visibleSize = Director::getInstance()->getVisibleSize(); auto label LabelcreateWithSystemFont("多点触摸demo", "" 24); label->setPosition(Vec2(visibleSize.width/2height));thisaddChildlabel1100 listener EventListenerTouchAllAtOncecreate listeneronTouchesBegan [&](const std::vector<Touch*>& touchs Event* event){ label1 (Label*) getChildByTag(for(&touch: finger touchgetID()+; label1setString"按下去"+Valuefinger).asString"根手指^^" } }; _eventDispatcheraddEventListenerWithSceneGraPHPrioritylistener);
原文链接:https://www.f2er.com/cocos2dx/339855.html

猜你在找的Cocos2d-x相关文章