cocos2d-x触摸事件addTouchEventListener在2.x和3.x的区别
发布时间:2020-12-14 17:17:56 所属栏目:百科 来源:网络整理
导读:?? //老版本cocos2d-x 2.x addTouchEventListener(this, toucheventselector (MyLayer::touchEvent)); void touchEvent(cocos2d::Ref* pSender,cocos2d::ui::TouchEventType type) //新版本cocos2d-x 3.x addTouchEventListener( CC_CALLBACK_2 ( MyLayer::t
??
//老版本cocos2d-x 2.x addTouchEventListener(this, toucheventselector(MyLayer::touchEvent)); void touchEvent(cocos2d::Ref* pSender,cocos2d::ui::TouchEventType type)
//新版本cocos2d-x 3.x addTouchEventListener( CC_CALLBACK_2( MyLayer::touchEvent,this )); void touchEvent(cocos2d::Ref* pSender,cocos2d::ui::Widget::TouchEventType type); (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |