码迷,mamicode.com
首页 > 其他好文 > 详细

Cocos2d-x3.X版本事件注册方法

时间:2014-09-03 16:59:06      阅读:210      评论:0      收藏:0      [点我收藏+]

标签:os   io   ar   art   sp   on   c   ad   php   

Cocos2d-x3.X版本事件注册方法:

        auto listener = EventListenerTouchOneByOne::create();
        listener->onTouchBegan = CC_CALLBACK_2(ChartDemoScene::onTouchBegan,this);
        
        Director::getInstance()->getEventDispatcher()->addEventListenerWithSceneGraphPriority(listener, sprite);


Cocos2d-x3.X版本事件注册方法

标签:os   io   ar   art   sp   on   c   ad   php   

原文地址:http://blog.csdn.net/yuxikuo_1/article/details/39027891

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!