<legend id='XC0f9'><style id='XC0f9'><dir id='XC0f9'><q id='XC0f9'></q></dir></style></legend>

  • <small id='XC0f9'></small><noframes id='XC0f9'>

      <i id='XC0f9'><tr id='XC0f9'><dt id='XC0f9'><q id='XC0f9'><span id='XC0f9'><b id='XC0f9'><form id='XC0f9'><ins id='XC0f9'></ins><ul id='XC0f9'></ul><sub id='XC0f9'></sub></form><legend id='XC0f9'></legend><bdo id='XC0f9'><pre id='XC0f9'><center id='XC0f9'></center></pre></bdo></b><th id='XC0f9'></th></span></q></dt></tr></i><div id='XC0f9'><tfoot id='XC0f9'></tfoot><dl id='XC0f9'><fieldset id='XC0f9'></fieldset></dl></div>
      1. <tfoot id='XC0f9'></tfoot>

        • <bdo id='XC0f9'></bdo><ul id='XC0f9'></ul>

        使用 CCTouchDispatcher Cocos2d 2.0 Beta-2 ARC

        Using CCTouchDispatcher Cocos2d 2.0 Beta-2 ARC(使用 CCTouchDispatcher Cocos2d 2.0 Beta-2 ARC)
            <tbody id='iUp4w'></tbody>
        • <small id='iUp4w'></small><noframes id='iUp4w'>

          • <bdo id='iUp4w'></bdo><ul id='iUp4w'></ul>
            <i id='iUp4w'><tr id='iUp4w'><dt id='iUp4w'><q id='iUp4w'><span id='iUp4w'><b id='iUp4w'><form id='iUp4w'><ins id='iUp4w'></ins><ul id='iUp4w'></ul><sub id='iUp4w'></sub></form><legend id='iUp4w'></legend><bdo id='iUp4w'><pre id='iUp4w'><center id='iUp4w'></center></pre></bdo></b><th id='iUp4w'></th></span></q></dt></tr></i><div id='iUp4w'><tfoot id='iUp4w'></tfoot><dl id='iUp4w'><fieldset id='iUp4w'></fieldset></dl></div>
            <legend id='iUp4w'><style id='iUp4w'><dir id='iUp4w'><q id='iUp4w'></q></dir></style></legend>

            <tfoot id='iUp4w'></tfoot>

                  本文介绍了使用 CCTouchDispatcher Cocos2d 2.0 Beta-2 ARC的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在用 cocos2d 2.0 BETA 2.0 [最新的] 创建一个游戏.我需要在其他班级添加一个操纵杆.所以我在第二堂课中称它为CCTouchDispatcher".但我不能这样打电话:

                  I am creating a game with cocos2d 2.0 BETA 2.0 [The newest one]. And i need to add a joystick in other class. so I call this "CCTouchDispatcher" in my second class. But I can't call like this:

                  [[CCTouchDispatcher sharedDispatcher] addTargetedDelegate:self priority:0 swallowsTouches:YES];
                  

                  所以我做了这个:

                  _tocuhDispatcher = [[CCTouchDispatcher alloc] init];
                  [_tocuhDispatcher addTargetedDelegate:self priority:0 swallowsTouches:YES];
                  

                  但仍然无法检测到触摸.如果我在 HelloWorldLayer 中启用触摸,我可以通过触摸移动我的对象,但操纵杆不起作用

                  But still can't detect the touches. If I enable the touches in my HelloWorldLayer I could move my object with the touches but no the joystick doesn't work

                  我能做什么?

                  推荐答案

                  CCDirector *director = [CCDirector sharedDirector];
                  [[director touchDispatcher] addTargetedDelegate:self priority:0 swallowsTouches:YES]; 
                  

                  这篇关于使用 CCTouchDispatcher Cocos2d 2.0 Beta-2 ARC的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Hardware Volume buttons change in app volume(硬件音量按钮更改应用程序音量)
                  Cocos2d - How to check for Intersection between objects in different layers(Cocos2d - 如何检查不同层中对象之间的交集)
                  Resume game cocos2d(恢复游戏 cocos2d)
                  Highlight Read-Along Text (in a storybook type app for iPhone)(突出显示朗读文本(在 iPhone 的故事书类型应用程序中))
                  Cocos2D + Disabling only Retina iPad Graphics(Cocos2D + 仅禁用 Retina iPad 图形)
                  How to convert 32 bit PNG to RGB565?(如何将 32 位 PNG 转换为 RGB565?)

                    <i id='70ogJ'><tr id='70ogJ'><dt id='70ogJ'><q id='70ogJ'><span id='70ogJ'><b id='70ogJ'><form id='70ogJ'><ins id='70ogJ'></ins><ul id='70ogJ'></ul><sub id='70ogJ'></sub></form><legend id='70ogJ'></legend><bdo id='70ogJ'><pre id='70ogJ'><center id='70ogJ'></center></pre></bdo></b><th id='70ogJ'></th></span></q></dt></tr></i><div id='70ogJ'><tfoot id='70ogJ'></tfoot><dl id='70ogJ'><fieldset id='70ogJ'></fieldset></dl></div>
                  • <legend id='70ogJ'><style id='70ogJ'><dir id='70ogJ'><q id='70ogJ'></q></dir></style></legend>
                      <tbody id='70ogJ'></tbody>

                        <small id='70ogJ'></small><noframes id='70ogJ'>

                            <bdo id='70ogJ'></bdo><ul id='70ogJ'></ul>
                          • <tfoot id='70ogJ'></tfoot>